Browse Source

Merge pull request #1 from miguelfreitas/master

update
master
Eugene Lifescale 10 years ago
parent
commit
6374da5da9
  1. 10
      css/style.css
  2. 49
      home.html
  3. 274
      js/interface_common.js
  4. 90
      js/interface_home.js
  5. 740
      js/interface_localization.js
  6. 82
      js/jQueryPlugins.js
  7. 359
      js/options.js
  8. 5
      js/twister_following.js
  9. 68
      js/twister_timeline.js
  10. 30
      licenses/caret.license
  11. 25
      licenses/franc.license
  12. 9
      licenses/notify.js.license
  13. 40
      options.html
  14. 5
      theme_calm/css/style.css
  15. 13
      theme_nin/css/style.css
  16. 10
      theme_nin/sass/style.sass

10
css/style.css

@ -785,6 +785,7 @@ textarea.splited-post {
opacity: 1; opacity: 1;
} }
.refresh-toptrends,
.refresh-users, .refresh-users,
.view-all-users .view-all-users
{ {
@ -794,8 +795,9 @@ textarea.splited-post {
} }
/*********************************** /***********************************
**********TOP TRENDS**************** ************ TOP TRENDS ************
***********************************/ ***********************************/
ol.toptrends-list { ol.toptrends-list {
margin: 0% 5% 5% 5%; margin: 0% 5% 5% 5%;
padding: 5px; padding: 5px;
@ -803,9 +805,9 @@ ol.toptrends-list {
border-top: solid 1px rgba( 69, 71, 77, .1 ); border-top: solid 1px rgba( 69, 71, 77, .1 );
} }
.toptrends h3 .toptrends h3 {
{ margin: 5% 0% 2% 5%;
margin: 5% 5% 2% 5%; display: inline;
} }
/*********************************** /***********************************

49
home.html

@ -114,7 +114,7 @@
<!-- LADO ESQUERDO DE MÓDULOS INIT --> <!-- LADO ESQUERDO DE MÓDULOS INIT -->
<div class="dashboard left"> <div class="dashboard left">
<!-- PROFILE MODULE INIT --> <!-- PROFILE MODULE -->
<div class="module mini-profile"> <div class="module mini-profile">
<div class="mini-profile-info"> <div class="mini-profile-info">
<!-- THEME NIN added sub-menu (mentions, messages and edit profile) --> <!-- THEME NIN added sub-menu (mentions, messages and edit profile) -->
@ -151,29 +151,12 @@
</form> </form>
</div> </div>
</div> </div>
<!-- PROFILE MODULE INIT -->
<!-- WHO TO FOLLOW MODULE INIT --> <!-- WHO TO FOLLOW MODULE -->
<div class="module who-to-follow"> <div class="module who-to-follow"></div>
<h3>Who to Follow</h3>
<small>.</small>
<a class="refresh-users">Refresh</a>
<small>.</small>
<a class="view-all-users" href="#whotofollow">View All</a>
<ol class="follow-suggestions">
<!-- use "follow-suggestion-template" here -->
</ol>
</div>
<!-- WHO TO FOLLOW MODULE END -->
<!-- WHO TO FOLLOW MODULE INIT --> <!-- TOP TRENDS MODULE -->
<div class="module toptrends"> <div class="module toptrends"></div>
<h3><span>Top Trends</span></h3>
<ol class="toptrends-list">
<!-- use "follow-suggestion-template" here -->
</ol>
</div>
<!-- WHO TO FOLLOW MODULE END -->
</div> </div>
<!-- LADO ESQUERDO DE MÓDULOS END --> <!-- LADO ESQUERDO DE MÓDULOS END -->
@ -225,6 +208,28 @@
<!-- TEMPLATES INIT --> <!-- TEMPLATES INIT -->
<div id="templates" style="display:none;"> <div id="templates" style="display:none;">
<!-- TEMPLATE DE WHO-TO-FOLLOW MODULE -->
<div id="who-to-follow-template">
<h3 class="label">Who to Follow</h3>
<small>.</small>
<a class="refresh-users">Refresh</a>
<small>.</small>
<a class="view-all-users" href="#whotofollow">View All</a>
<ol class="follow-suggestions">
<!-- use "follow-suggestion-template" here -->
</ol>
</div>
<!-- TEMPLATE DE TOP TRENDS MODULE -->
<div id="toptrends-template">
<h3 class="label">Top Trends</h3>
<small>.</small>
<a class="refresh-toptrends">Refresh</a>
<ol class="toptrends-list">
<!-- use "follow-suggestion-template" here -->
</ol>
</div>
<!-- TEMPLATE DE WHO-TO-FOLLOW SUGGESTION --> <!-- TEMPLATE DE WHO-TO-FOLLOW SUGGESTION -->
<li id="follow-suggestion-template" class="twister-user"> <li id="follow-suggestion-template" class="twister-user">
<div class=""> <div class="">

274
js/interface_common.js

@ -292,7 +292,7 @@ function refreshWhoToFollow(e) {
e.stopPropagation(); e.stopPropagation();
e.preventDefault(); e.preventDefault();
$('.follow-suggestions').html(''); $('.module.who-to-follow .follow-suggestions').empty();
getRandomFollowSuggestion(processSuggestion); getRandomFollowSuggestion(processSuggestion);
getRandomFollowSuggestion(processSuggestion); getRandomFollowSuggestion(processSuggestion);
@ -729,10 +729,11 @@ var composeNewPost = function( e, postAreaNew )
} }
var textArea = postAreaNew.find("textarea"); var textArea = postAreaNew.find("textarea");
textArea.focus();
if( textArea.attr("data-reply-to") && !textArea.val().length ) { if( textArea.attr("data-reply-to") && !textArea.val().length ) {
textArea.val(textArea.attr("data-reply-to")); textArea.val(textArea.attr("data-reply-to"));
} }
if (!postAreaNew.find("textarea:focus").length)
postAreaNew.find("textarea:last").focus();
} }
//Reduz Área do Novo post //Reduz Área do Novo post
@ -751,63 +752,76 @@ function checkPostForMentions(post, mentions, max) {
var splitedPostsCount = 1; var splitedPostsCount = 1;
var usePostSpliting = false; var usePostSpliting = false;
function replyTextKeypress(e) { function replyTextInput(e) {
e = e || event; e = e || event;
var $this = $( this ); var $this = $( this );
var tweetForm = $this.parents("form"); var tweetForm = $this.parents("form");
if( tweetForm != undefined ) { if( tweetForm != undefined ) {
if ($.Options.getUnicodeConversionOpt() !== "disable") if ($.Options.getUnicodeConversionOpt() !== "disable")
$this.val(convert2Unicodes($this.val(), $this)); $this.val(convert2Unicodes($this.val(), $this));
var c = 140 - $this.val().length;
if (usePostSpliting && !$this.parents('.directMessages').length) { if (usePostSpliting && !$this.parents('.directMessages').length) {
var $tas = tweetForm.find("textarea"); var $tas = tweetForm.find("textarea");
splitedPostsCount = $tas.length; splitedPostsCount = $tas.length;
if ($this.hasClass('splited-post')) var icurrentta = $tas.index(this); // current textarea $tas index
$this.css('height', '28px'); if (splitedPostsCount > 1)
var pml = getPostSplitingPML();
else
var pml = 140;
var cci = getPostSpittingCI(icurrentta);
var caretPos = $this.caret();
var reply_to = $this.attr('data-reply-to'); var reply_to = $this.attr('data-reply-to');
for (var i = 0; i < $tas.length; i++) {
var pml = 140 - (i+1).toString().length - splitedPostsCount.toString().length - 4;
//if mention exists, we shouldn't add it while posting.
if (typeof(reply_to) !== 'undefined' &&
!checkPostForMentions($tas[i].value, reply_to, pml - reply_to.length)) {
pml -= reply_to.length;
}
for (var i = 0; i < $tas.length; i++) {
if ($tas[i].value.length > pml) { if ($tas[i].value.length > pml) {
var endings = $tas[i].value.match(/ |,|;|\.|:|\/|\?|\!|\\|'|"|\n|\t/g); if (pml === 140)
var ci = $tas[i].value.lastIndexOf(endings[endings.length - 1]); pml = getPostSplitingPML();
for (var j = endings.length - 2; j >= 0 && ci > pml; j--) { var ci = getPostSpittingCI(i);
ci = $tas[i].value.lastIndexOf(endings[j], ci - 1);
}
ci = (ci > pml ? pml : ci);
if (i < splitedPostsCount - 1) { if (i < splitedPostsCount - 1) {
$tas[i + 1].value = $tas[i].value.substr(ci) + $tas[i + 1].value; $tas[i + 1].value = $tas[i].value.substr(ci) + $tas[i + 1].value;
$tas[i].value = $tas[i].value.substr(0, ci); $tas[i].value = $tas[i].value.substr(0, ci);
if (caretPos > cci) {
caretPos -= ci;
icurrentta += 1;
cci = getPostSpittingCI(icurrentta);
var $targetta = $($tas[icurrentta]);
} else if (i === icurrentta)
$($tas[i]).caret(caretPos);
} else { } else {
var $oldta = $($tas[i]); var $oldta = $($tas[i]);
if (typeof($.fn.textcomplete) === 'function') {
$oldta.textcomplete('destroy');
e.stopImmediatePropagation(); // something goes wrong in $.fn.textcomplete if we don't stop this immediately
}
var $newta = $($oldta).clone(true); var $newta = $($oldta).clone(true);
var cp = $oldta.val(); var cp = $oldta.val();
$oldta.val(cp.substr(0, ci)); $oldta.after($newta);
$oldta.on("click", function(e) {
e.stopPropagation();
this.style.height = '80px';
});
$oldta.unbind("keyup");
$oldta.on("blur", replyTextKeypress);
$oldta.addClass('splited-post');
tweetForm.find(".textcomplete-wrapper").append($newta); // FIXME come find textcomplete-wrapper anywhere in code
$newta.val(cp.substr(ci)); $newta.val(cp.substr(ci));
$newta.focus(); $oldta.val(cp.substr(0, ci));
if ($newta[0].setSelectionRange)
$newta[0].setSelectionRange($newta.val().length, $newta.val().length);
else if ($newta[0].createTextRange)
$newta[0].createTextRange().moveEnd('character', $newta.val().length);
$tas = tweetForm.find("textarea"); $tas = tweetForm.find("textarea");
splitedPostsCount = $tas.length; splitedPostsCount = $tas.length;
pml = getPostSplitingPML();
$oldta.on('focus', function() {
this.style.height = '80px';
});
$oldta.addClass('splited-post');
$oldta.on('focusout', function() {this.style.height = '28px';}); // FIXME move this to CSS
if (caretPos > cci) {
caretPos -= ci;
icurrentta += 1;
cci = getPostSpittingCI(icurrentta);
var $targetta = $newta;
$oldta[0].style.height = '28px'; // FIXME move this to CSS
} else if (i === icurrentta) {
$($tas[i]).caret(caretPos);
replyTextUpdateRemaining($tas[i]);
if (typeof($.fn.textcomplete) === 'function')
setTextcompleteOn($tas[i]);
}
} }
} else if ($tas.length > 1 && $tas[i].value.length === 0) { } else if ($tas.length > 1 && $tas[i].value.length === 0) {
@ -819,34 +833,113 @@ function replyTextKeypress(e) {
} }
$tas = tweetForm.find("textarea"); $tas = tweetForm.find("textarea");
splitedPostsCount = $tas.length; splitedPostsCount = $tas.length;
if (splitedPostsCount > 1)
pml = getPostSplitingPML();
else
pml = 140;
caretPos = -1;
if (icurrentta >= i && icurrentta > 0) {
icurrentta -= 1;
cci = getPostSpittingCI(icurrentta);
}
var $targetta = $($tas[icurrentta]);
} }
} }
c = 140 - $tas[$tas.length - 1].value.length - (2 * splitedPostsCount.toString().length) - 4; if (typeof($targetta) !== 'undefined' && $targetta[0] !== document.activeElement) {
if (typeof(reply_to) !== 'undefined' && $this = $targetta;
!checkPostForMentions($tas[$tas.length - 1].value, reply_to, 140 - c - reply_to.length)) $this.focus();
c -= reply_to.length; $this.caret(caretPos);
}
} }
var remainingCount = tweetForm.find(".post-area-remaining"); }
if( c < 0 ) function getPostSplitingPML() {
remainingCount.addClass("warn"); var pml = 140 -(i+1).toString().length -splitedPostsCount.toString().length -4;
else
remainingCount.removeClass("warn");
if (usePostSpliting && !$this.parents('.directMessages').length) // if mention exists, we shouldn't add it while posting.
remainingCount.text(splitedPostsCount.toString() + ". post: " + c.toString()); if (typeof(reply_to) !== 'undefined' &&
else !checkPostForMentions($tas[i].value, reply_to, pml -reply_to.length)) {
remainingCount.text(c.toString()); pml -= reply_to.length;
}
return pml;
}
function getPostSpittingCI(ita) {
var ci;
var endings = $tas[ita].value.match(/ |,|;|\.|:|\/|\?|\!|\\|'|"|\n|\t/g);
if (endings) {
ci = $tas[ita].value.lastIndexOf(endings[endings.length - 1]);
for (var j = endings.length - 2; j >= 0 && ci > pml; j--) {
ci = $tas[ita].value.lastIndexOf(endings[j], ci - 1);
}
}
if (!(ci > 0))
ci = pml;
return (ci > pml) ? pml : ci;
}
}
function replyTextUpdateRemaining(ta) {
if (ta === document.activeElement ) {
var $this = $(ta);
var tweetForm = $this.closest('form');
if( tweetForm != undefined ) {
var remainingCount = tweetForm.find(".post-area-remaining");
var c = replyTextCountRemaining(ta);
if (usePostSpliting && !$this.parents('.directMessages').length && splitedPostsCount > 1)
remainingCount.text((tweetForm.find("textarea").index(ta)+1).toString() +'/' +splitedPostsCount.toString() +": " +c.toString());
else
remainingCount.text(c.toString());
var tweetAction = tweetForm.find(".post-submit");
if( !tweetAction.length ) tweetAction = tweetForm.find(".dm-submit");
var disable = false;
$this.closest('form').find("textarea").each(function() {
if (replyTextCountRemaining(this) < 0) {
disable = true; // alternatively we could call replyTextInput()
return false;
}
});
if (!disable && c >= 0 && c < 140 && $this.val() != $this.attr("data-reply-to")) {
remainingCount.removeClass("warn");
$.MAL.enableButton(tweetAction);
} else {
if (disable)
remainingCount.addClass("warn");
$.MAL.disableButton(tweetAction);
}
}
}
}
function replyTextCountRemaining(ta) {
var $this = $(ta);
var c;
if (usePostSpliting && !$this.parents('.directMessages').length && splitedPostsCount > 1) {
c = 140 -ta.value.length -($this.closest('form').find("textarea").index(ta)+1).toString().length -splitedPostsCount.toString().length -4;
var reply_to = $this.attr('data-reply-to');
if (typeof(reply_to) !== 'undefined' &&
!checkPostForMentions(ta.value, reply_to, 140 -c -reply_to.length))
c -= reply_to.length;
} else
c = 140 - ta.value.length;
return c;
}
function replyTextKeySend(e) {
e = e || event;
var $this = $( this );
var tweetForm = $this.parents('form');
if( tweetForm != undefined ) {
var tweetAction = tweetForm.find(".post-submit"); var tweetAction = tweetForm.find(".post-submit");
if( !tweetAction.length ) tweetAction = tweetForm.find(".dm-submit"); if( !tweetAction.length ) tweetAction = tweetForm.find(".dm-submit");
if( c >= 0 && c < 140 &&
$this.val() != $this.attr("data-reply-to") ) {
$.MAL.enableButton(tweetAction);
} else {
$.MAL.disableButton(tweetAction);
}
if( $.Options.keyEnterToSend() && $('.dropdown-menu').css('display') == 'none'){ if( $.Options.keyEnterToSend() && $('.dropdown-menu').css('display') == 'none'){
if (e.keyCode === 13 && (!e.metaKey && !e.ctrlKey)) { if (e.keyCode === 13 && (!e.metaKey && !e.ctrlKey)) {
@ -1445,19 +1538,20 @@ function replaceDashboards() {
if ($(window).width() >= 1200 && !$('.wrapper').hasClass('w1200')) { if ($(window).width() >= 1200 && !$('.wrapper').hasClass('w1200')) {
$('.wrapper').addClass('w1200'); $('.wrapper').addClass('w1200');
$('.userMenu').addClass('w1200'); $('.userMenu').addClass('w1200');
var wf = $('.module.who-to-follow'); var wtf = $('.module.who-to-follow');
wf.detach(); if (wtf.length > 0) {
wf.appendTo($('.dashboard.right')); wtf.detach();
wtf.appendTo($('.dashboard.right'));
}
} else if ($(window).width() < 1200 && $('.wrapper').hasClass('w1200')) { } else if ($(window).width() < 1200 && $('.wrapper').hasClass('w1200')) {
$('.wrapper').removeClass('w1200'); $('.wrapper').removeClass('w1200');
$('.userMenu').removeClass('w1200'); $('.userMenu').removeClass('w1200');
var wf = $('.module.who-to-follow'); var wtf = $('.module.who-to-follow');
wf.detach(); if (wtf.length > 0) {
$('.module.mini-profile').after(wf); wtf.detach();
$('.module.mini-profile').after(wtf);
}
} }
$( ".who-to-follow .refresh-users" ).bind( "click", refreshWhoToFollow );
//$( ".who-to-follow .view-all-users" ).bind( "click", function(){window.location.hash = "#whotofollow"} );
} }
function initInterfaceCommon() { function initInterfaceCommon() {
@ -1508,7 +1602,9 @@ function initInterfaceCommon() {
$( ".undo-unicode" ).click( undoLastUnicode ); $( ".undo-unicode" ).click( undoLastUnicode );
var $replyText = $( ".post-area-new textarea" ); var $replyText = $( ".post-area-new textarea" );
$replyText.on("keyup", replyTextKeypress ); $replyText.on('input', replyTextInput); // input event fires in modern browsers (IE9+) on any changes in textarea (and copypasting with mouse too)
$replyText.on('input focus', function() {replyTextUpdateRemaining(this);});
$replyText.on('keyup', replyTextKeySend);
$( ".open-profile-modal").bind( "click", function(e){ e.stopPropagation(); } ); $( ".open-profile-modal").bind( "click", function(e){ e.stopPropagation(); } );
//$( ".open-hashtag-modal").bind( "click", openHashtagModal ); //$( ".open-hashtag-modal").bind( "click", openHashtagModal );
@ -1519,6 +1615,11 @@ function initInterfaceCommon() {
replaceDashboards(); replaceDashboards();
$( window ).resize(replaceDashboards); $( window ).resize(replaceDashboards);
if ($.Options.getWhoToFollowOpt() === 'enable')
initWhoToFollow();
else
killWhoToFollow();
$('.tox-ctc').on('click', function(){ $('.tox-ctc').on('click', function(){
window.prompt(polyglot.t('copy_to_clipboard'), $(this).attr('data')) window.prompt(polyglot.t('copy_to_clipboard'), $(this).attr('data'))
}); });
@ -1528,25 +1629,42 @@ function initInterfaceCommon() {
if (typeof($.fn.textcomplete) === 'function') { if (typeof($.fn.textcomplete) === 'function') {
$('textarea') $('textarea')
.on('focus', function () { .on('focus', function () { setTextcompleteOn(this); })
var element = this; .on('focusout', function () { $(this).textcomplete('destroy'); })
// Cursor has not set yet. And wait 100ms to skip global click event.
setTimeout(function () {
// Cursor is ready.
$(element).textcomplete(getMentionsForAutoComplete(), {
'appendTo': ($(element).parents('.dashboard').length > 0) ? $(element).parent() : $('body'),
'listPosition': setTextcompleteDropdownListPos
});
}, 100);
})
.on('focusout', function () {
$(this).textcomplete('destroy');
})
; ;
} }
} }
function initWhoToFollow() {
var wtf = $('.module.who-to-follow');
if (wtf.length) {
wtf.html($('#who-to-follow-template').html()).show();
var wtfRefresh = wtf.find('.refresh-users');
wtfRefresh.on('click', refreshWhoToFollow);
setTimeout(function() { wtfRefresh.click() }, 100);
//wtf.find('.view-all-users').on('click', function() { window.location.hash = '#whotofollow'; });
}
}
function killWhoToFollow() {
var wtf = $('.module.who-to-follow');
if (wtf.length)
wtf.empty().hide();
}
function setTextcompleteOn(element) {
var $this = $(element);
// Cursor has not set yet. And wait 100ms to skip global click event.
setTimeout(function () {
// Cursor is ready.
$this.textcomplete(getMentionsForAutoComplete(), {
'appendTo': ($this.parents('.dashboard').length > 0) ? $this.parent() : $('body'),
'listPosition': setTextcompleteDropdownListPos
});
}, 100);
}
// following workaround function is for calls from $.fn.textcomplete only // following workaround function is for calls from $.fn.textcomplete only
// we need this because currently implementation of caret position detection is way too imperfect // we need this because currently implementation of caret position detection is way too imperfect

90
js/interface_home.js

@ -99,10 +99,6 @@ var InterfaceFunctions = function()
twisterFollowingO = TwisterFollowing(defaultScreenName); twisterFollowingO = TwisterFollowing(defaultScreenName);
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
setTimeout("getRandomFollowSuggestion(processSuggestion)", 1000);
if( args.cbFunc ) if( args.cbFunc )
args.cbFunc(args.cbArg); args.cbFunc(args.cbArg);
}, {cbFunc:cbFunc, cbArg:cbArg}); }, {cbFunc:cbFunc, cbArg:cbArg});
@ -122,45 +118,67 @@ var InterfaceFunctions = function()
}); });
} }
setTimeout(updateTrendingHashtags, 1000); if ($.Options.getTopTrendsOpt() === 'enable')
if ($.Options.getTopTrendsAutoUpdateOpt() === 'enable' && $.Options.getTopTrendsAutoUpdateTimerOpt() > 0) initTopTrends();
setInterval(updateTrendingHashtags, $.Options.getTopTrendsAutoUpdateTimerOpt()*1000); else
killTopTrends();
} }
}; };
function initTopTrends() {
var $tt = $('.module.toptrends');
if ($tt.length) {
$tt.html($('#toptrends-template').html()).show();
var $ttRefresh = $tt.find('.refresh-toptrends');
$ttRefresh.on('click', updateTrendingHashtags);
setTimeout(function() { $ttRefresh.click() }, 100);
}
}
function killTopTrends() {
var $tt = $('.module.toptrends');
if ($tt.length)
$tt.empty().hide();
}
function updateTrendingHashtags() { function updateTrendingHashtags() {
twisterRpc('gettrendinghashtags', [10], var $ttl = $('.module.toptrends .toptrends-list');
function(args, ret) { if ($ttl.length) {
$('.toptrends-list').empty(); twisterRpc('gettrendinghashtags', [10],
//console.log('hashtags trends: '+ret); function(args, ret) {
for( var i = 0; i < ret.length; i++ ) { $ttl.empty();
if ($.Options.getFilterLangOpt() !== 'disable' && $.Options.getFilterLangForTopTrendsOpt()) //console.log('hashtags trends: '+ret);
var langFilterData = filterLang(ret[i]); for( var i = 0; i < ret.length; i++ ) {
if (typeof(langFilterData) === 'undefined' || langFilterData['pass'] || $.Options.getFilterLangSimulateOpt()) { if ($.Options.getFilterLangOpt() !== 'disable' && $.Options.getFilterLangForTopTrendsOpt())
var $li = $('<li>'); var langFilterData = filterLang(ret[i]);
var hashtagLinkTemplate = $('#hashtag-link-template').clone(true); if (typeof(langFilterData) === 'undefined' || langFilterData['pass'] || $.Options.getFilterLangSimulateOpt()) {
var $li = $('<li>');
hashtagLinkTemplate.removeAttr('id'); var hashtagLinkTemplate = $('#hashtag-link-template').clone(true);
hashtagLinkTemplate.attr('href',$.MAL.hashtagUrl(ret[i]));
hashtagLinkTemplate.text('#'+ret[i]); hashtagLinkTemplate.removeAttr('id');
hashtagLinkTemplate.attr('href',$.MAL.hashtagUrl(ret[i]));
$li.append(hashtagLinkTemplate); hashtagLinkTemplate.text('#'+ret[i]);
if ($.Options.getFilterLangOpt() !== 'disable' && $.Options.getFilterLangSimulateOpt()) {
if (typeof(langFilterData) !== 'undefined') { $li.append(hashtagLinkTemplate);
$li.append(' <span class="langFilterSimData"><em>'+((langFilterData['pass']) ? polyglot.t('passed') : polyglot.t('blocked'))+'</em>: '+langFilterData['prob'][0].toString()+'</span>'); if ($.Options.getFilterLangOpt() !== 'disable' && $.Options.getFilterLangSimulateOpt()) {
} else { if (typeof(langFilterData) !== 'undefined') {
$li.append(' <span class="langFilterSimData"><em>'+polyglot.t('not analyzed')+'</em></span>'); $li.append(' <span class="langFilterSimData"><em>'+((langFilterData['pass']) ? polyglot.t('passed') : polyglot.t('blocked'))+'</em>: '+langFilterData['prob'][0].toString()+'</span>');
} else {
$li.append(' <span class="langFilterSimData"><em>'+polyglot.t('not analyzed')+'</em></span>');
}
} }
}
$('.toptrends-list').append($li); $ttl.append($li);
}
} }
} }, {},
}, {}, function(args, ret) {
function(args, ret) { console.log('Error with gettrendinghashtags. Older twister daemon?');
console.log('Error with gettrendinghashtags. Older twister daemon?'); }, {}
}, {} );
); if ($.Options.getTopTrendsAutoUpdateOpt() === 'enable' && $.Options.getTopTrendsAutoUpdateTimerOpt() > 0)
setTimeout(updateTrendingHashtags, $.Options.getTopTrendsAutoUpdateTimerOpt()*1000);
}
}; };
//*********************************************** //***********************************************

740
js/interface_localization.js

File diff suppressed because it is too large Load Diff

82
js/jQueryPlugins.js

@ -11,4 +11,84 @@
}); });
return $(this); return $(this);
} }
})(jQuery); })(jQuery);
(function($) {
$.fn.caret = function(pos) {
var target = this[0];
var isContentEditable = target.contentEditable === 'true';
//get
if (arguments.length == 0) {
//HTML5
if (window.getSelection) {
//contenteditable
if (isContentEditable) {
target.focus();
var range1 = window.getSelection().getRangeAt(0),
range2 = range1.cloneRange();
range2.selectNodeContents(target);
range2.setEnd(range1.endContainer, range1.endOffset);
return range2.toString().length;
}
//textarea
return target.selectionStart;
}
//IE<9
if (document.selection) {
target.focus();
//contenteditable
if (isContentEditable) {
var range1 = document.selection.createRange(),
range2 = document.body.createTextRange();
range2.moveToElementText(target);
range2.setEndPoint('EndToEnd', range1);
return range2.text.length;
}
//textarea
var pos = 0,
range = target.createTextRange(),
range2 = document.selection.createRange().duplicate(),
bookmark = range2.getBookmark();
range.moveToBookmark(bookmark);
while (range.moveStart('character', -1) !== 0) pos++;
return pos;
}
// Addition for jsdom support
if (target.selectionStart)
return target.selectionStart;
//not supported
return 0;
}
//set
if (pos == -1)
pos = this[isContentEditable? 'text' : 'val']().length;
//HTML5
if (window.getSelection) {
//contenteditable
if (isContentEditable) {
target.focus();
window.getSelection().collapse(target.firstChild, pos);
}
//textarea
else
target.setSelectionRange(pos, pos);
}
//IE<9
else if (document.body.createTextRange) {
if (isContentEditable) {
var range = document.body.createTextRange();
range.moveToElementText(target);
range.moveStart('character', pos);
range.collapse(true);
range.select();
} else {
var range = target.createTextRange();
range.move('character', pos);
range.select();
}
}
if (!isContentEditable)
target.focus();
return pos;
}
})(jQuery);

359
js/options.js

@ -20,15 +20,15 @@ var TwisterOptions = function()
} }
this.soundNotifOptions = function() { this.soundNotifOptions = function() {
$('#notifyForm select').each(function(){ $('#notifyForm select').each(function() {
this.value = $.Options.getOption(this.id, "false"); this.value = $.Options.getOption(this.id, 'false');
}); });
var player = $('#player'); var player = $('#player');
player[0].pause(); player[0].pause();
$('#player').empty(); $('#player').empty();
$('form#notifyForm').on('change','select',function(){ $('form#notifyForm').on('change', 'select', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
if(this.value == false) {player[0].pause(); return;} if(this.value == false) {player[0].pause(); return;}
@ -46,10 +46,10 @@ var TwisterOptions = function()
this.volumeControl = function() { this.volumeControl = function() {
var playerVol = $('#playerVol'); var playerVol = $('#playerVol');
playerVol[0].value = $.Options.getOption(playerVol[0].id, 1); playerVol[0].value = this.getOption(playerVol[0].id, 1);
$('.volValue').text((playerVol[0].value * 100).toFixed()); $('.volValue').text((playerVol[0].value * 100).toFixed());
playerVol.on('change',function(){ playerVol.on('change', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
$('#player')[0].volume = (this.value); $('#player')[0].volume = (this.value);
$('.volValue').text((this.value * 100).toFixed()); $('.volValue').text((this.value * 100).toFixed());
@ -57,8 +57,8 @@ var TwisterOptions = function()
} }
this.DMsNotif = function() { this.DMsNotif = function() {
var sndDM = $.Options.getOption('sndDM', "false"); var sndDM = this.getOption('sndDM', 'false');
if( sndDM == "false") return; if ( sndDM === 'false') return;
var player = $('#player'); var player = $('#player');
$('#player').empty(); $('#player').empty();
@ -69,13 +69,13 @@ var TwisterOptions = function()
player.attr('type', 'audio/ogg'); player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+sndDM+'.ogg'); player.attr('src', 'sound/'+sndDM+'.ogg');
} }
player[0].volume = $.Options.getOption('playerVol',1); player[0].volume = this.getOption('playerVol',1);
player[0].play(); player[0].play();
} }
this.mensNotif = function() { this.mensNotif = function() {
var sndMention = $.Options.getOption('sndMention', "false"); var sndMention = this.getOption('sndMention', 'false');
if(sndMention == "false") return; if (sndMention === 'false') return;
var player = $('#playerSec'); var player = $('#playerSec');
$('#playerSec').empty(); $('#playerSec').empty();
@ -86,23 +86,22 @@ var TwisterOptions = function()
player.attr('type', 'audio/ogg'); player.attr('type', 'audio/ogg');
player.attr('src', 'sound/'+sndMention+'.ogg'); player.attr('src', 'sound/'+sndMention+'.ogg');
} }
player[0].volume = $.Options.getOption('playerVol',1); player[0].volume = this.getOption('playerVol',1);
player[0].play(); player[0].play();
} }
this.getShowDesktopNotifPostsOpt = function() { this.getShowDesktopNotifPostsOpt = function() {
return $.Options.getOption('showDesktopNotifPosts','enable'); return this.getOption('showDesktopNotifPosts', 'enable');
} }
this.setShowDesktopNotifPostsOpt = function () { this.setShowDesktopNotifPostsOpt = function () {
function showDesktopNotifPostsDesc() { function showDesktopNotifPostsDesc() {
if ($.Options.getShowDesktopNotifPostsOpt() === 'enable') { if ($.Options.getShowDesktopNotifPostsOpt() === 'enable')
$('#showDesktopNotifPostsDesc')[0].style.display= 'inline'; $('#showDesktopNotifPostsDesc').css('display', 'inline');
} else { else
$('#showDesktopNotifPostsDesc')[0].style.display= 'none'; $('#showDesktopNotifPostsDesc').css('display', 'none');
}
} }
$('#showDesktopNotifPosts').val(this.getShowDesktopNotifPostsOpt()); $('#showDesktopNotifPosts').val( this.getShowDesktopNotifPostsOpt() );
showDesktopNotifPostsDesc(); showDesktopNotifPostsDesc();
$('#showDesktopNotifPosts').on('change', function() { $('#showDesktopNotifPosts').on('change', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
@ -111,28 +110,26 @@ var TwisterOptions = function()
} }
this.getShowDesktopNotifPostsTimerOpt = function () { this.getShowDesktopNotifPostsTimerOpt = function () {
return parseInt($.Options.getOption('showDesktopNotifPostsTimer', '6')); return parseInt(this.getOption('showDesktopNotifPostsTimer', '6'));
} }
this.setShowDesktopNotifPostsTimerOpt = function () { this.setShowDesktopNotifPostsTimerOpt = function () {
$('#showDesktopNotifPostsTimer')[0].value = this.getShowDesktopNotifPostsTimerOpt().toString(); $('#showDesktopNotifPostsTimer').val( this.getShowDesktopNotifPostsTimerOpt().toString() );
$('#showDesktopNotifPostsTimer').on('keyup', function () { setElemValNumeric(this, polyglot.t('second(s)')); });
$('#showDesktopNotifPostsTimer').on('keyup', function () {setElemValNumeric(this, polyglot.t('second(s)'));});
} }
this.getShowDesktopNotifPostsModalOpt = function() { this.getShowDesktopNotifPostsModalOpt = function() {
return $.Options.getOption('showDesktopNotifPostsModal','enable'); return this.getOption('showDesktopNotifPostsModal', 'enable');
} }
this.setShowDesktopNotifPostsModalOpt = function () { this.setShowDesktopNotifPostsModalOpt = function () {
function showDesktopNotifPostsModalDesc() { function showDesktopNotifPostsModalDesc() {
if ($.Options.getShowDesktopNotifPostsModalOpt() === 'enable') { if ($.Options.getShowDesktopNotifPostsModalOpt() === 'enable')
$('#showDesktopNotifPostsModalDesc')[0].style.display= 'inline'; $('#showDesktopNotifPostsModalDesc').css('display', 'inline');
} else { else
$('#showDesktopNotifPostsModalDesc')[0].style.display= 'none'; $('#showDesktopNotifPostsModalDesc').css('display', 'none');
}
} }
$('#showDesktopNotifPostsModal').val(this.getShowDesktopNotifPostsModalOpt()); $('#showDesktopNotifPostsModal').val( this.getShowDesktopNotifPostsModalOpt() );
showDesktopNotifPostsModalDesc(); showDesktopNotifPostsModalDesc();
$('#showDesktopNotifPostsModal').on('change', function() { $('#showDesktopNotifPostsModal').on('change', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
@ -141,28 +138,26 @@ var TwisterOptions = function()
} }
this.getShowDesktopNotifPostsModalTimerOpt = function () { this.getShowDesktopNotifPostsModalTimerOpt = function () {
return parseInt($.Options.getOption('showDesktopNotifPostsModalTimer', '6')); return parseInt(this.getOption('showDesktopNotifPostsModalTimer', '6'));
} }
this.setShowDesktopNotifPostsModalTimerOpt = function () { this.setShowDesktopNotifPostsModalTimerOpt = function () {
$('#showDesktopNotifPostsModalTimer')[0].value = this.getShowDesktopNotifPostsModalTimerOpt().toString(); $('#showDesktopNotifPostsModalTimer').val( this.getShowDesktopNotifPostsModalTimerOpt().toString() );
$('#showDesktopNotifPostsModalTimer').on('keyup', function () { setElemValNumeric(this, polyglot.t('second(s)')); });
$('#showDesktopNotifPostsModalTimer').on('keyup', function () {setElemValNumeric(this, polyglot.t('second(s)'));});
} }
this.getShowDesktopNotifMentionsOpt = function() { this.getShowDesktopNotifMentionsOpt = function() {
return $.Options.getOption('showDesktopNotifMentions','enable'); return this.getOption('showDesktopNotifMentions', 'enable');
} }
this.setShowDesktopNotifMentionsOpt = function () { this.setShowDesktopNotifMentionsOpt = function () {
function showDesktopNotifMentionsDesc() { function showDesktopNotifMentionsDesc() {
if ($.Options.getShowDesktopNotifMentionsOpt() === 'enable') { if ($.Options.getShowDesktopNotifMentionsOpt() === 'enable')
$('#showDesktopNotifMentionsDesc')[0].style.display= 'inline'; $('#showDesktopNotifMentionsDesc').css('display', 'inline');
} else { else
$('#showDesktopNotifMentionsDesc')[0].style.display= 'none'; $('#showDesktopNotifMentionsDesc').css('display', 'none');
}
} }
$('#showDesktopNotifMentions').val(this.getShowDesktopNotifMentionsOpt()); $('#showDesktopNotifMentions').val( this.getShowDesktopNotifMentionsOpt() );
showDesktopNotifMentionsDesc(); showDesktopNotifMentionsDesc();
$('#showDesktopNotifMentions').on('change', function() { $('#showDesktopNotifMentions').on('change', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
@ -171,28 +166,26 @@ var TwisterOptions = function()
} }
this.getShowDesktopNotifMentionsTimerOpt = function () { this.getShowDesktopNotifMentionsTimerOpt = function () {
return parseInt($.Options.getOption('showDesktopNotifMentionsTimer', '60')); return parseInt(this.getOption('showDesktopNotifMentionsTimer', '60'));
} }
this.setShowDesktopNotifMentionsTimerOpt = function () { this.setShowDesktopNotifMentionsTimerOpt = function () {
$('#showDesktopNotifMentionsTimer')[0].value = this.getShowDesktopNotifMentionsTimerOpt().toString(); $('#showDesktopNotifMentionsTimer').val( this.getShowDesktopNotifMentionsTimerOpt().toString() );
$('#showDesktopNotifMentionsTimer').on('keyup', function () {setElemValNumeric(this, polyglot.t('second(s)'));}); $('#showDesktopNotifMentionsTimer').on('keyup', function () {setElemValNumeric(this, polyglot.t('second(s)'));});
} }
this.getShowDesktopNotifDMsOpt = function() { this.getShowDesktopNotifDMsOpt = function() {
return $.Options.getOption('showDesktopNotifDMs','enable'); return this.getOption('showDesktopNotifDMs', 'enable');
} }
this.setShowDesktopNotifDMsOpt = function () { this.setShowDesktopNotifDMsOpt = function () {
function showDesktopNotifDMsDesc() { function showDesktopNotifDMsDesc() {
if ($.Options.getShowDesktopNotifDMsOpt() === 'enable') { if ($.Options.getShowDesktopNotifDMsOpt() === 'enable')
$('#showDesktopNotifDMsDesc')[0].style.display= 'inline'; $('#showDesktopNotifDMsDesc').css('display', 'inline');
} else { else
$('#showDesktopNotifDMsDesc')[0].style.display= 'none'; $('#showDesktopNotifDMsDesc').css('display', 'none');
}
} }
$('#showDesktopNotifDMs').val(this.getShowDesktopNotifDMsOpt()); $('#showDesktopNotifDMs').val( this.getShowDesktopNotifDMsOpt() );
showDesktopNotifDMsDesc(); showDesktopNotifDMsDesc();
$('#showDesktopNotifDMs').on('change', function() { $('#showDesktopNotifDMs').on('change', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
@ -201,13 +194,12 @@ var TwisterOptions = function()
} }
this.getShowDesktopNotifDMsTimerOpt = function () { this.getShowDesktopNotifDMsTimerOpt = function () {
return parseInt($.Options.getOption('showDesktopNotifDMsTimer', '60')); return parseInt(this.getOption('showDesktopNotifDMsTimer', '60'));
} }
this.setShowDesktopNotifDMsTimerOpt = function () { this.setShowDesktopNotifDMsTimerOpt = function () {
$('#showDesktopNotifDMsTimer')[0].value = this.getShowDesktopNotifDMsTimerOpt().toString(); $('#showDesktopNotifDMsTimer').val( this.getShowDesktopNotifDMsTimerOpt().toString() );
$('#showDesktopNotifDMsTimer').on('keyup', function () { setElemValNumeric(this, polyglot.t('second(s)')); });
$('#showDesktopNotifDMsTimer').on('keyup', function () {setElemValNumeric(this, polyglot.t('second(s)'));});
} }
this.setTestDesktopNotif = function() { this.setTestDesktopNotif = function() {
@ -216,159 +208,156 @@ var TwisterOptions = function()
}) })
} }
this.keysSendDefault = "ctrlenter"; this.keysSendDefault = 'ctrlenter';
this.keysSend = function() { this.keysSend = function() {
$('#keysOpt select')[0].value = $.Options.getOption('keysSend',this.keysSendDefault); $('#keysOpt select').val( this.getOption('keysSend',this.keysSendDefault) );
$('#keysOpt select').on('change', function() { $.Options.setOption(this.id, this.value); });
$('#keysOpt select').on('change', function(){
$.Options.setOption(this.id, this.value);
})
} }
this.keyEnterToSend = function() { this.keyEnterToSend = function() {
return $.Options.getOption('keysSend',this.keysSendDefault) == "enter"; return this.getOption('keysSend', this.keysSendDefault) === 'enter';
} }
this.setLang = function() { this.setLang = function() {
$('#language').val($.Options.getOption('locLang','auto')) $('#language').val( this.getOption('locLang', 'auto') );
$('#language').on('change', function(){ $('#language').on('change', function() {
$.Options.setOption('locLang', $(this).val()); $.Options.setOption('locLang', $(this).val());
if($(this).val() != 'auto') {
twisterRpc("setpreferredspamlang", [$(this).val()]);
}
location.reload(); location.reload();
}) })
} }
this.getTheme = function() { this.getTheme = function() {
return $.Options.getOption('theme','original'); return this.getOption('theme', 'original');
} }
this.setTheme = function() { this.setTheme = function() {
$('#theme').val(this.getTheme()) $('#theme').val( this.getTheme() )
$('#theme').on('change', function(){ $('#theme').on('change', function() {
$.Options.setOption('theme', $(this).val()); $.Options.setOption('theme', $(this).val());
location.reload(); location.reload();
}); });
} }
this.getLineFeedsOpt = function() { this.getLineFeedsOpt = function() {
return $.Options.getOption('displayLineFeeds',"disable"); return this.getOption('displayLineFeeds', 'disable');
} }
this.setLineFeedsOpt = function() { this.setLineFeedsOpt = function() {
$('#lineFeedsOpt select')[0].value = this.getLineFeedsOpt(); $('#lineFeedsOpt select').val( this.getLineFeedsOpt() );
$('#lineFeedsOpt select').on('change', function() { $.Options.setOption(this.id, this.value); });
$('#lineFeedsOpt select').on('change', function(){
$.Options.setOption(this.id, this.value);
})
} }
this.getShowPreviewOpt = function() { this.getShowPreviewOpt = function() {
return $.Options.getOption('displayPreview',"disable"); return this.getOption('displayPreview', 'disable');
} }
this.setShowPreviewOpt = function () { this.setShowPreviewOpt = function () {
$('#showPreviewOpt select')[0].value = this.getShowPreviewOpt(); $('#showPreviewOpt select').val( this.getShowPreviewOpt() );
$('#showPreviewOpt select').on('change', function() { $.Options.setOption(this.id, this.value); });
$('#showPreviewOpt select').on('change', function(){
$.Options.setOption(this.id, this.value);
});
} }
this.getUnicodeConversionOpt = function () { this.getUnicodeConversionOpt = function () {
return $.Options.getOption('unicodeConversion', "disable"); return this.getOption('unicodeConversion', 'disable');
} }
this.setUnicodeConversionOpt = function () { this.setUnicodeConversionOpt = function () {
$("#unicodeConversion")[0].value = this.getUnicodeConversionOpt(); $('#unicodeConversion').val( this.getUnicodeConversionOpt() );
if (this.getUnicodeConversionOpt() === "custom") if (this.getUnicodeConversionOpt() === 'custom')
$("#unicodeConversionOpt .suboptions")[0].style.height = "230px"; $('#unicodeConversionOpt .suboptions').css('height', 'auto');
$("#unicodeConversion").on('change', function () { $('#unicodeConversion').on('change', function () {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
if (this.value === "custom") if (this.value === 'custom')
$("#unicodeConversionOpt .suboptions")[0].style.height = "230px"; $('#unicodeConversionOpt .suboptions').css('height', 'auto');
else else
$("#unicodeConversionOpt .suboptions")[0].style.height = "0px"; $('#unicodeConversionOpt .suboptions').css('height', '0px');
}); });
} }
this.getConvertPunctuationsOpt = function() { this.getConvertPunctuationsOpt = function() {
return $.Options.getOption('convertPunctuationsOpt', false); return this.getOption('convertPunctuationsOpt', false);
} }
this.setConvertPunctuationsOpt = function () { this.setConvertPunctuationsOpt = function () {
$('#convertPunctuationsOpt')[0].checked = this.getConvertPunctuationsOpt(); $('#convertPunctuationsOpt').prop('checked', this.getConvertPunctuationsOpt());
$('#convertPunctuationsOpt').on('change', function() { $.Options.setOption(this.id, this.checked); });
$('#convertPunctuationsOpt').on('change', function(){
$.Options.setOption(this.id, this.checked);
});
} }
this.getConvertEmotionsOpt = function() { this.getConvertEmotionsOpt = function() {
return $.Options.getOption('convertEmotionsOpt', false); return this.getOption('convertEmotionsOpt', false);
} }
this.setConvertEmotionsOpt = function () { this.setConvertEmotionsOpt = function () {
$('#convertEmotionsOpt')[0].checked = this.getConvertEmotionsOpt(); $('#convertEmotionsOpt').prop('checked', this.getConvertEmotionsOpt());
$('#convertEmotionsOpt').on('change', function() { $.Options.setOption(this.id, this.checked); });
$('#convertEmotionsOpt').on('change', function(){
$.Options.setOption(this.id, this.checked);
});
} }
this.getConvertSignsOpt = function() { this.getConvertSignsOpt = function() {
return $.Options.getOption('convertSignsOpt', false); return this.getOption('convertSignsOpt', false);
} }
this.setConvertSignsOpt = function () { this.setConvertSignsOpt = function () {
$('#convertSignsOpt')[0].checked = this.getConvertSignsOpt(); $('#convertSignsOpt').prop('checked', this.getConvertSignsOpt());
$('#convertSignsOpt').on('change', function() { $.Options.setOption(this.id, this.checked); });
$('#convertSignsOpt').on('change', function(){
$.Options.setOption(this.id, this.checked);
});
} }
this.getConvertFractionsOpt = function() { this.getConvertFractionsOpt = function() {
return $.Options.getOption('convertFractionsOpt', false); return this.getOption('convertFractionsOpt', false);
} }
this.setConvertFractionsOpt = function () { this.setConvertFractionsOpt = function () {
$('#convertFractionsOpt')[0].checked = this.getConvertFractionsOpt(); $('#convertFractionsOpt').prop('checked', this.getConvertFractionsOpt());
$('#convertFractionsOpt').on('change', function() { $.Options.setOption(this.id, this.checked); });
$('#convertFractionsOpt').on('change', function(){
$.Options.setOption(this.id, this.checked);
});
} }
this.getUseProxyOpt = function () { this.getUseProxyOpt = function () {
return $.Options.getOption('useProxy', 'disable'); return this.getOption('useProxy', 'disable');
} }
this.setUseProxyOpt = function () { this.setUseProxyOpt = function () {
$('#useProxy')[0].value = this.getUseProxyOpt(); $('#useProxy').val( this.getUseProxyOpt() );
if (this.getUseProxyOpt() === 'disable') if (this.getUseProxyOpt() === 'disable')
$('#useProxyForImgOnly').attr('disabled','disabled'); $('#useProxyForImgOnly').attr('disabled', 'disabled');
$('#useProxy').on('change', function () { $('#useProxy').on('change', function () {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
if (this.value === 'disable') if (this.value === 'disable')
$('#useProxyForImgOnly').attr('disabled','disabled'); $('#useProxyForImgOnly').attr('disabled', 'disabled');
else else
$('#useProxyForImgOnly').removeAttr('disabled'); $('#useProxyForImgOnly').removeAttr('disabled');
}); });
} }
this.getUseProxyForImgOnlyOpt = function () { this.getUseProxyForImgOnlyOpt = function () {
return $.Options.getOption('useProxyForImgOnly', false); return this.getOption('useProxyForImgOnly', false);
} }
this.setUseProxyForImgOnlyOpt = function () { this.setUseProxyForImgOnlyOpt = function () {
$('#useProxyForImgOnly')[0].checked = this.getUseProxyForImgOnlyOpt(); $('#useProxyForImgOnly').prop('checked', this.getUseProxyForImgOnlyOpt());
$('#useProxyForImgOnly').on('change', function () { $.Options.setOption(this.id, this.checked); });
}
this.getTopTrendsOpt = function() {
return this.getOption('TopTrends', 'enable');
}
$('#useProxyForImgOnly').on('change', function () { this.setTopTrendsOpt = function () {
$.Options.setOption(this.id, this.checked); function TopTrendsCfg() {
if ($.Options.getTopTrendsOpt() === 'enable')
$('#TopTrendsCont').show();
else
$('#TopTrendsCont').hide();
}
$('#TopTrends').val( this.getTopTrendsOpt() );
TopTrendsCfg();
$('#TopTrends').on('change', function() {
$.Options.setOption(this.id, this.value);
TopTrendsCfg();
}); });
} }
@ -378,13 +367,12 @@ var TwisterOptions = function()
this.setTopTrendsAutoUpdateOpt = function () { this.setTopTrendsAutoUpdateOpt = function () {
function TopTrendsAutoUpdateCfg() { function TopTrendsAutoUpdateCfg() {
if ($.Options.getTopTrendsAutoUpdateOpt() === 'enable') { if ($.Options.getTopTrendsAutoUpdateOpt() === 'enable')
$('#TopTrendsAutoUpdateOpt')[0].style.display= 'inline'; $('#TopTrendsAutoUpdateOpt').css('display', 'inline');
} else { else
$('#TopTrendsAutoUpdateOpt')[0].style.display= 'none'; $('#TopTrendsAutoUpdateOpt').css('display', 'none');
}
} }
$('#TopTrendsAutoUpdate').val(this.getTopTrendsAutoUpdateOpt()); $('#TopTrendsAutoUpdate').val( this.getTopTrendsAutoUpdateOpt() );
TopTrendsAutoUpdateCfg(); TopTrendsAutoUpdateCfg();
$('#TopTrendsAutoUpdate').on('change', function() { $('#TopTrendsAutoUpdate').on('change', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
@ -397,86 +385,77 @@ var TwisterOptions = function()
} }
this.setTopTrendsAutoUpdateTimerOpt = function () { this.setTopTrendsAutoUpdateTimerOpt = function () {
$('#TopTrendsAutoUpdateTimer')[0].value = this.getTopTrendsAutoUpdateTimerOpt().toString(); $('#TopTrendsAutoUpdateTimer').val( this.getTopTrendsAutoUpdateTimerOpt().toString() );
$('#TopTrendsAutoUpdateTimer').on('keyup', function () { setElemValNumeric(this, polyglot.t('second(s)')); });
}
$('#TopTrendsAutoUpdateTimer').on('keyup', function () {setElemValNumeric(this, polyglot.t('second(s)'));}); this.getWhoToFollowOpt = function() {
return this.getOption('WhoToFollow', 'enable');
} }
this.getSplitPostsOpt = function (){ this.setWhoToFollowOpt = function () {
return $.Options.getOption('splitPosts', 'disable'); $('#WhoToFollow').val(this.getWhoToFollowOpt());
$('#WhoToFollow').on('change', function() { $.Options.setOption(this.id, this.value); });
} }
this.setSplitPostsOpt = function () { this.getSplitPostsOpt = function () {
$('#splitPosts')[0].value = this.getSplitPostsOpt(); return this.getOption('splitPosts', 'disable');
}
$('#splitPosts').on('change', function () { this.setSplitPostsOpt = function () {
$.Options.setOption(this.id, this.value); $('#splitPosts').val( this.getSplitPostsOpt() );
}); $('#splitPosts').on('change', function () { $.Options.setOption(this.id, this.value); });
} }
this.getHideRepliesOpt = function () { this.getHideRepliesOpt = function () {
return $.Options.getOption('hideReplies', 'following'); return this.getOption('hideReplies', 'following');
} }
this.setHideRepliesOpt = function () { this.setHideRepliesOpt = function () {
$('#hideReplies')[0].value = this.getHideRepliesOpt(); $('#hideReplies').val( this.getHideRepliesOpt() );
$('#hideReplies').on('change', function () { $.Options.setOption(this.id, this.value); });
$('#hideReplies').on('change', function () {
$.Options.setOption(this.id, this.value);
});
} }
this.getHideCloseRTsOpt = function () { this.getHideCloseRTsOpt = function () {
return $.Options.getOption('hideCloseRTs', 'disable'); return this.getOption('hideCloseRTs', 'disable');
}; };
this.setHideCloseRTsOpt = function () { this.setHideCloseRTsOpt = function () {
$('#hideCloseRTs')[0].value = this.getHideCloseRTsOpt(); function hideCloseRTsCfg() {
if ($.Options.getHideCloseRTsOpt() === 'disable')
if (this.getHideCloseRTsOpt() === 'disable') { $('#hideCloseRTsDesc').css('display', 'none');
$('#hideCloseRTsDesc')[0].style.display = 'none'; else
} else { $('#hideCloseRTsDesc').css('display', 'inline');
$('#hideCloseRTsDesc')[0].style.display = 'inline';
} }
$('#hideCloseRTs').val( this.getHideCloseRTsOpt() );
hideCloseRTsCfg();
$('#hideCloseRTs').on('change', function () { $('#hideCloseRTs').on('change', function () {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
hideCloseRTsCfg();
if (this.value === 'disable') {
$('#hideCloseRTsDesc')[0].style.display = 'none';
} else {
$('#hideCloseRTsDesc')[0].style.display = 'inline';
}
}); });
}; };
this.getHideCloseRTsHourOpt = function () { this.getHideCloseRTsHourOpt = function () {
return parseInt($.Options.getOption('hideCloseRtsHour', '1')); return parseInt(this.getOption('hideCloseRtsHour', '1'));
}; };
this.setHideCloseRTsHourOpt = function () { this.setHideCloseRTsHourOpt = function () {
$('#hideCloseRtsHour')[0].value = this.getHideCloseRTsHourOpt().toString(); $('#hideCloseRtsHour').val( this.getHideCloseRTsHourOpt().toString() );
$('#hideCloseRtsHour').on('keyup', function () { setElemValNumeric(this, polyglot.t('hour(s)')); });
$('#hideCloseRtsHour').on('keyup', function () {setElemValNumeric(this, polyglot.t('hour(s)'));});
};
this.getIsFollowingMeOpt = function () {
return $.Options.getOption('isFollowingMe');
}; };
this.getFilterLangOpt = function() { this.getFilterLangOpt = function() {
return this.getOption('filterLang','disable'); return this.getOption('filterLang', 'disable');
} }
this.setFilterLangOpt = function () { this.setFilterLangOpt = function () {
function filterLangListCont() { function filterLangListCont() {
if ( $.Options.getFilterLangOpt() !== 'disable' ) { if ( $.Options.getFilterLangOpt() !== 'disable' )
$('#filterLangListCont')[0].style.display= 'block'; $('#filterLangListCont').css('display', 'block');
} else { else
$('#filterLangListCont')[0].style.display= 'none'; $('#filterLangListCont').css('display', 'none');
}
} }
$('#filterLang').val(this.getFilterLangOpt()); $('#filterLang').val( this.getFilterLangOpt() );
filterLangListCont(); filterLangListCont();
$('#filterLang').on('change', function() { $('#filterLang').on('change', function() {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
@ -489,9 +468,9 @@ var TwisterOptions = function()
} }
this.setFilterLangListOpt = function () { this.setFilterLangListOpt = function () {
$('#filterLangList').val(this.getFilterLangListOpt()); $('#filterLangList').val( this.getFilterLangListOpt() );
$('#filterLangList').on('keyup', function () {$.Options.setOption(this.id, this.value);}); $('#filterLangList').on('keyup', function () { $.Options.setOption(this.id, this.value); });
} }
this.getFilterLangAccuracyOpt = function () { this.getFilterLangAccuracyOpt = function () {
@ -499,8 +478,8 @@ var TwisterOptions = function()
} }
this.setFilterLangAccuracyOpt = function () { this.setFilterLangAccuracyOpt = function () {
$('#filterLangAccuracy').val(this.getFilterLangAccuracyOpt()); $('#filterLangAccuracy').val( this.getFilterLangAccuracyOpt() );
$('#filterLangAccuracyVal').text(this.getFilterLangAccuracyOpt()); $('#filterLangAccuracyVal').text( this.getFilterLangAccuracyOpt() );
$('#filterLangAccuracy').on('change', function () { $('#filterLangAccuracy').on('change', function () {
$.Options.setOption(this.id, this.value); $.Options.setOption(this.id, this.value);
$('#filterLangAccuracyVal').text(this.value); $('#filterLangAccuracyVal').text(this.value);
@ -513,8 +492,7 @@ var TwisterOptions = function()
this.setFilterLangForPostboardOpt = function () { this.setFilterLangForPostboardOpt = function () {
$('#filterLangForPostboard').prop('checked', this.getFilterLangForPostboardOpt()); $('#filterLangForPostboard').prop('checked', this.getFilterLangForPostboardOpt());
$('#filterLangForPostboard').on('click', function () { $.Options.setOption(this.id, this.checked); });
$('#filterLangForPostboard').on('click', function () {$.Options.setOption(this.id, this.checked);});
} }
this.getFilterLangForSearchingOpt = function () { this.getFilterLangForSearchingOpt = function () {
@ -523,8 +501,7 @@ var TwisterOptions = function()
this.setFilterLangForSearchingOpt = function () { this.setFilterLangForSearchingOpt = function () {
$('#filterLangForSearching').prop('checked', this.getFilterLangForSearchingOpt()); $('#filterLangForSearching').prop('checked', this.getFilterLangForSearchingOpt());
$('#filterLangForSearching').on('click', function () { $.Options.setOption(this.id, this.checked); });
$('#filterLangForSearching').on('click', function () {$.Options.setOption(this.id, this.checked);});
} }
this.getFilterLangForTopTrendsOpt = function () { this.getFilterLangForTopTrendsOpt = function () {
@ -533,8 +510,7 @@ var TwisterOptions = function()
this.setFilterLangForTopTrendsOpt = function () { this.setFilterLangForTopTrendsOpt = function () {
$('#filterLangForTopTrends').prop('checked', this.getFilterLangForTopTrendsOpt()); $('#filterLangForTopTrends').prop('checked', this.getFilterLangForTopTrendsOpt());
$('#filterLangForTopTrends').on('click', function () { $.Options.setOption(this.id, this.checked); });
$('#filterLangForTopTrends').on('click', function () {$.Options.setOption(this.id, this.checked);});
} }
this.getFilterLangSimulateOpt = function () { this.getFilterLangSimulateOpt = function () {
@ -543,28 +519,25 @@ var TwisterOptions = function()
this.setFilterLangSimulateOpt = function () { this.setFilterLangSimulateOpt = function () {
$('#filterLangSimulate').prop('checked', this.getFilterLangSimulateOpt()); $('#filterLangSimulate').prop('checked', this.getFilterLangSimulateOpt());
$('#filterLangSimulate').on('click', function () { $.Options.setOption(this.id, this.checked); });
$('#filterLangSimulate').on('click', function () {$.Options.setOption(this.id, this.checked);});
} }
this.setIsFollowingMeOpt = function () { this.getIsFollowingMeOpt = function () {
$('#isFollowingMe')[0].value = this.getIsFollowingMeOpt(); return this.getOption('isFollowingMe', 'in-profile');
};
$('#isFollowingMe').on('change', function () { this.setIsFollowingMeOpt = function () {
$.Options.setOption(this.id, this.value); $('#isFollowingMe').val( this.getIsFollowingMeOpt() );
}); $('#isFollowingMe').on('change', function () { $.Options.setOption(this.id, this.value); });
}; };
this.getDMCopySelfOpt = function() { this.getDMCopySelfOpt = function() {
return $.Options.getOption('dmCopySelf',"enable"); return this.getOption('dmCopySelf', 'enable');
} }
this.setDMCopySelfOpt = function () { this.setDMCopySelfOpt = function () {
$('#dmCopySelfOpt select')[0].value = this.getDMCopySelfOpt(); $('#dmCopySelfOpt select').val( this.getDMCopySelfOpt() );
$('#dmCopySelfOpt select').on('change', function() { $.Options.setOption(this.id, this.value); });
$('#dmCopySelfOpt select').on('change', function(){
$.Options.setOption(this.id, this.value);
});
} }
this.InitOptions = function() { this.InitOptions = function() {
@ -592,7 +565,9 @@ var TwisterOptions = function()
this.setUseProxyOpt(); this.setUseProxyOpt();
this.setUseProxyForImgOnlyOpt(); this.setUseProxyForImgOnlyOpt();
this.setTopTrendsAutoUpdateOpt(); this.setTopTrendsAutoUpdateOpt();
this.setTopTrendsOpt();
this.setTopTrendsAutoUpdateTimerOpt(); this.setTopTrendsAutoUpdateTimerOpt();
this.setWhoToFollowOpt();
this.setSplitPostsOpt(); this.setSplitPostsOpt();
this.setHideRepliesOpt(); this.setHideRepliesOpt();
this.setHideCloseRTsHourOpt(); this.setHideCloseRTsHourOpt();

5
js/twister_following.js

@ -441,7 +441,8 @@ function getRandomFollowSuggestion(cbFunc, cbArg) {
var i = parseInt( Math.random() * followingUsers.length ); var i = parseInt( Math.random() * followingUsers.length );
if ( (i < followingUsers.length && followingUsers[i] == defaultScreenName) || if ( (i < followingUsers.length && followingUsers[i] == defaultScreenName) ||
typeof(twisterFollowingO.followingsFollowings[followingUsers[i]]) === 'undefined') { typeof(twisterFollowingO) === 'undefined' ||
typeof(twisterFollowingO.followingsFollowings[followingUsers[i]]) === 'undefined') {
setTimeout(function() {getRandomFollowSuggestion(cbFunc, cbArg);}, 500); setTimeout(function() {getRandomFollowSuggestion(cbFunc, cbArg);}, 500);
return; return;
@ -562,7 +563,7 @@ function showFollowingUsers(){
} }
function processSuggestion(arg, suggestion, followedBy) { function processSuggestion(arg, suggestion, followedBy) {
var dashboard = $(".follow-suggestions"); var dashboard = $('.module.who-to-follow .follow-suggestions');
if( suggestion ) { if( suggestion ) {
var item = $("#follow-suggestion-template").clone(true); var item = $("#follow-suggestion-template").clone(true);
item.removeAttr("id"); item.removeAttr("id");

68
js/twister_timeline.js

@ -189,44 +189,42 @@ function showPosts(req, posts)
var streamItemsParent = $.MAL.getStreamPostsParent(); var streamItemsParent = $.MAL.getStreamPostsParent();
for( var i = 0; i < posts.length; i++ ) { for( var i = 0; i < posts.length; i++ ) {
if (req.users.indexOf(posts[i]['userpost']['n']) > -1 || req.getspam) { // FIXME maybe it's unecessary check but currently we got unwanted adverting posts which are coming with requested ones from 'getposts' sometimes var post = posts[i];
var post = posts[i]; //console.log(post);
//console.log(post); var streamPost = postToElem(post, "original", req.getspam);
var streamPost = postToElem(post, "original", req.getspam); var timePost = post["userpost"]["time"];
var timePost = post["userpost"]["time"]; streamPost.attr("data-time",timePost);
streamPost.attr("data-time",timePost);
// post will only be shown if appended to the stream list
// post will only be shown if appended to the stream list var streamPostAppended = false;
var streamPostAppended = false;
// insert the post in timeline ordered by (you guessed) time
// insert the post in timeline ordered by (you guessed) time // FIXME: lame! searching everything everytime. please optimize!
// FIXME: lame! searching everything everytime. please optimize! var streamItems = streamItemsParent.children();
var streamItems = streamItemsParent.children(); if( streamItems.length == 0) {
if( streamItems.length == 0) { // timeline is empty
// timeline is empty streamItemsParent.append( streamPost );
streamItemsParent.append( streamPost ); streamPostAppended = true;
streamPostAppended = true; } else {
} else { var j = 0;
var j = 0; for( j = 0; j < streamItems.length; j++) {
for( j = 0; j < streamItems.length; j++) { var streamItem = streamItems.eq(j);
var streamItem = streamItems.eq(j); var timeItem = streamItem.attr("data-time");
var timeItem = streamItem.attr("data-time"); if( timeItem == undefined ||
if( timeItem == undefined || timePost > parseInt(timeItem) ) {
timePost > parseInt(timeItem) ) { // this post in stream is older, so post must be inserted above
// this post in stream is older, so post must be inserted above streamItem.before(streamPost);
streamItem.before(streamPost); streamPostAppended = true;
streamPostAppended = true; break;
break;
}
} }
} }
if (!streamPostAppended)
streamItemsParent.append( streamPost );
streamPostAppended = true;
streamPost.show();
req.reportProcessedPost(post["userpost"]["n"],post["userpost"]["k"], streamPostAppended);
} }
if (!streamPostAppended)
streamItemsParent.append( streamPost );
streamPostAppended = true;
streamPost.show();
req.reportProcessedPost(post["userpost"]["n"],post["userpost"]["k"], streamPostAppended);
} }
} }

30
licenses/caret.license

@ -0,0 +1,30 @@
Copyright (c) 2009, Gideon Sireling
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
* Neither the name of Gideon Sireling nor the names of other
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

25
licenses/franc.license

@ -0,0 +1,25 @@
(The MIT License)
Copyright (c) 2014-2015 Titus Wormer <tituswormer@gmail.com>
Copyright (c) 2008 Kent S Johnson
Copyright (c) 2006 Jacob R Rideout <kde@jacobrideout.net>
Copyright (c) 2004 Maciej Ceglowski
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

9
licenses/notify.js.license

@ -0,0 +1,9 @@
Copyright (c) 2014 Alex Gibson
http://alxgbsn.co.uk/
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction except as noted below, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sublicense, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE

40
options.html

@ -29,8 +29,8 @@
</head> </head>
<body> <body>
<!-- MENU SUPERIOR INIT --> <!-- MENU SUPERIOR INIT -->
<nav class="userMenu"> <nav class="userMenu">
<ul> <ul>
<li class="userMenu-home"><a href="home.html"><span class="selectable_theme theme_original label">Home</span></a></li> <li class="userMenu-home"><a href="home.html"><span class="selectable_theme theme_original label">Home</span></a></li>
@ -75,7 +75,7 @@
<select name="" id="language"> <select name="" id="language">
<option value="auto">Auto</option> <option value="auto">Auto</option>
<option value="pt-BR">Brazilian Portuguese</option> <option value="pt-BR">Brazilian Portuguese</option>
<option value="zh">Chinese</option> <option value="zh-CN">Chinese Simplified</option>
<option value="cs">Czech</option> <option value="cs">Czech</option>
<option value="nl">Dutch</option> <option value="nl">Dutch</option>
<option value="en">English</option> <option value="en">English</option>
@ -86,6 +86,7 @@
<option value="ru">Russian</option> <option value="ru">Russian</option>
<option value="es">Spanish</option> <option value="es">Spanish</option>
<option value="tr">Turkish</option> <option value="tr">Turkish</option>
<option value="uk">Ukrainian</option>
</select> </select>
</form> </form>
</div> </div>
@ -302,16 +303,35 @@
</div> </div>
<div class="module"> <div class="module">
<p class="label label-h"> Top Trends </p> <p class="label label-h"> Top Trends </p>
<div id="TopTrendsAutoUpdateCont" class="container"> <div class="container">
<form>
<p>
<select id="TopTrends">
<option value="enable">Enable</option>
<option value="disable">Disable</option>
</select>
</p>
<div id="TopTrendsCont" class="container">
<p class="label">Auto updating</p>
<select id="TopTrendsAutoUpdate" class="container">
<option value="enable">Enable</option>
<option value="disable">Disable</option>
</select>
<div id="TopTrendsAutoUpdateOpt" class="container">
<input type="text" id="TopTrendsAutoUpdateTimer" maxlength="6" size="6"/> <span class="label">second(s)</span>
</div>
</div>
</form>
</div>
</div>
<div class="module">
<p class="label label-h"> Who to Follow </p>
<div class="container">
<form> <form>
<p class="label">Auto updating</p> <select id="WhoToFollow">
<select id="TopTrendsAutoUpdate" class="container">
<option value="enable">Enable</option> <option value="enable">Enable</option>
<option value="disable">Disable</option> <option value="disable">Disable</option>
</select> </select>
<div id="TopTrendsAutoUpdateOpt" class="container">
<input type="text" id="TopTrendsAutoUpdateTimer" maxlength="6" size="6"/> <span class="label">second(s)</span>
</div>
</form> </form>
</div> </div>
</div> </div>
@ -332,7 +352,7 @@
<div class="container"> <div class="container">
<label>Supported punctuations: </label> <label>Supported punctuations: </label>
<span>‥ … ⁇ ⁈ ⁉ ‼ — ⁓</span> <span>‥ … ⁇ ⁈ ⁉ ‼ — ⁓</span>
</div> </div>
<input name="" id="convertEmotionsOpt" type="checkbox" /> <span class="label">Convert emotions codes to unicode symbols</span> <input name="" id="convertEmotionsOpt" type="checkbox" /> <span class="label">Convert emotions codes to unicode symbols</span>
<div class="container"> <div class="container">
<label>Supported emotions: </label> <label>Supported emotions: </label>

5
theme_calm/css/style.css

@ -969,6 +969,7 @@ textarea.splited-post {
text-decoration: none; text-decoration: none;
} }
.refresh-toptrends,
.refresh-users, .refresh-users,
.view-all-users .view-all-users
{ {
@ -979,14 +980,16 @@ textarea.splited-post {
} }
/*********************************** /***********************************
********************* TOP TRENDS ************ TOP TRENDS ************
***********************************/ ***********************************/
.module.toptrends { .module.toptrends {
margin-top: 10px; margin-top: 10px;
} }
.module.toptrends h3 { .module.toptrends h3 {
margin: 5px 0 5px 10px; margin: 5px 0 5px 10px;
font: 14px 'Open Sans', sans-serif; font: 14px 'Open Sans', sans-serif;
display: inline;
} }
.module.toptrends ol { .module.toptrends ol {
margin: 0 0 10px 10px; margin: 0 0 10px 10px;

13
theme_nin/css/style.css

@ -56,7 +56,7 @@
font-style: normal; font-style: normal;
} }
/* line 64, ../sass/_fonts.sass */ /* line 64, ../sass/_fonts.sass */
[class^="icon-"]:before, [class*=" icon-"]:before, .extend-icon:before, .userMenu li.userMenu-config > a:before, .post-context span:before, .post-reply:before, .post-propagate:before, .post-favorite:before, .post .show-more:before, .mini-profile-actions span:before, ul.userMenu-search-profiles button:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .twister-user-remove:before, .refresh-users:before, .modal-close:before, .mark-all-as-read:before, .modal-back:before, .icon-down-after:after { [class^="icon-"]:before, [class*=" icon-"]:before, .extend-icon:before, .userMenu li.userMenu-config > a:before, .post-context span:before, .post-reply:before, .post-propagate:before, .post-favorite:before, .post .show-more:before, .mini-profile-actions span:before, ul.userMenu-search-profiles button:before, .mini-profile-indicators .userMenu-connections a:before, .mini-profile-indicators .userMenu-messages a:before, .mini-profile-indicators .userMenu-user a:before, .twister-user-remove:before, .refresh-toptrends:before, .refresh-users:before, .modal-close:before, .mark-all-as-read:before, .modal-back:before, .icon-down-after:after {
font-family: "fontello"; font-family: "fontello";
font-style: normal; font-style: normal;
font-weight: normal; font-weight: normal;
@ -198,7 +198,7 @@
/* '' */ /* '' */
/* line 183, ../sass/_fonts.sass */ /* line 183, ../sass/_fonts.sass */
.icon-arrows:before, .refresh-users:before { .icon-arrows:before, .refresh-toptrends:before, .refresh-users:before {
content: ""; content: "";
} }
@ -1823,7 +1823,7 @@ button.disabled:hover, .mini-profile-actions span.disabled:hover, a.button.disab
width: 90%; width: 90%;
} }
.options #filterLangListCont div,.options #TopTrendsAutoUpdateCont div { .options #filterLangListCont div,.options #TopTrendsCont div {
float: none; float: none;
padding: 0px 4px; padding: 0px 4px;
} }
@ -2449,7 +2449,7 @@ button.follow:hover, .mini-profile-actions span.follow:hover, button.unfollow, .
} }
/* line 499, ../sass/style.sass */ /* line 499, ../sass/style.sass */
.refresh-users { .refresh-toptrends, .refresh-users {
color: #66686B; color: #66686B;
cursor: pointer; cursor: pointer;
font-size: 11px; font-size: 11px;
@ -2479,13 +2479,16 @@ button.follow:hover, .mini-profile-actions span.follow:hover, button.unfollow, .
} }
/* line 527, ../sass/style.sass */ /* line 527, ../sass/style.sass */
.refresh-users:hover, .view-all-users:hover { .refresh-toptrends:hover, .refresh-users:hover, .view-all-users:hover {
color: #B4C669; color: #B4C669;
text-decoration: none; text-decoration: none;
background-color: transparent; background-color: transparent;
} }
/***********TOP TRENDS************** */ /***********TOP TRENDS************** */
.toptrends h3 {
float: left;
}
/* line 534, ../sass/style.sass */ /* line 534, ../sass/style.sass */
ol.toptrends-list { ol.toptrends-list {
margin: 0; margin: 0;

10
theme_nin/sass/style.sass

@ -516,7 +516,7 @@ textarea.splited-post
.twister-user-remove:hover .twister-user-remove:hover
opacity: 1 opacity: 1
.refresh-users .refresh-toptrends, .refresh-users
@extend .icon-arrows @extend .icon-arrows
@extend .extend-icon @extend .extend-icon
color: $main-color-dark color: $main-color-dark
@ -544,13 +544,17 @@ textarea.splited-post
margin: 0 0 0 15px margin: 0 0 0 15px
position: relative position: relative
.refresh-users:hover, .view-all-users:hover .refresh-toptrends:hover, .refresh-users:hover, .view-all-users:hover
color: $main-color-color color: $main-color-color
text-decoration: none text-decoration: none
background-color: transparent background-color: transparent
/***********TOP TRENDS***************/ /***********TOP TRENDS***************/
.toptrends
h3
float: left
ol.toptrends-list ol.toptrends-list
margin: 0 margin: 0
margin-bottom: 10px margin-bottom: 10px
@ -1096,7 +1100,7 @@ ol.toptrends-list
#filterLangList #filterLangList
width: 90% width: 90%
#filterLangListCont div, #TopTrendsAutoUpdateCont div #filterLangListCont div, #TopTrendsCont div
float: none float: none
padding: 0px 4px padding: 0px 4px

Loading…
Cancel
Save