From 6f301505e33c42a37fbc7159f3144f41922c7dc6 Mon Sep 17 00:00:00 2001 From: Pashe Date: Sun, 19 Oct 2014 21:30:59 -0500 Subject: thread-watcher.js: change display format --- js/thread-watcher.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'js/thread-watcher.js') diff --git a/js/thread-watcher.js b/js/thread-watcher.js index 22656e48..52b8142e 100644 --- a/js/thread-watcher.js +++ b/js/thread-watcher.js @@ -28,10 +28,10 @@ watchlist.render = function(reset) { JSON.parse(localStorage.watchlist).forEach(function(e, i) { //look at line 69, that's what (e) is here. threads.push('
' + - 'Board: '+e[0]+' ' + - 'Thread: '+''+e[1]+' ' + - 'Replies: '+e[2]+' ' + - '[Unwatch]'+ + '/'+e[0]+'/ - ' + + ''+e[1].replace("thread_", "Thread #")+'' + + ' ('+e[2]+') ' + + 'X'+ '
'); }); if ($('#watchlist').length) { -- cgit v1.3 From 01446aad124291f88d5fab8f400321307dffebe7 Mon Sep 17 00:00:00 2001 From: Pashe Date: Mon, 20 Oct 2014 16:44:19 -0500 Subject: thread-watcher.js: fix background and border --- js/thread-watcher.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'js/thread-watcher.js') diff --git a/js/thread-watcher.js b/js/thread-watcher.js index 52b8142e..625e95e0 100644 --- a/js/thread-watcher.js +++ b/js/thread-watcher.js @@ -40,6 +40,7 @@ watchlist.render = function(reset) { $('#watchlist').append(threads.join('')); } else { //If the watchlist has not yet been rendered, create it. + var menuStyle = getComputedStyle($('.boardlist')[0]); $('form[name="post"]').before( $('
'+ '
'+ @@ -47,10 +48,7 @@ watchlist.render = function(reset) { '[Clear Ghosts]'+ '
'+ threads.join('')+ - '
').css({ - background: $('.reply').css('background'), - borderColor : $('.reply').css('border-color') - })); + '').css("background-color", menuStyle.backgroundColor).css("border", menuStyle.borderBottomWidth+" "+menuStyle.borderBottomStyle+" "+menuStyle.borderBottomColor)); } return this; }; -- cgit v1.3 From fd2e9df30cfd14b6c03d109c02e48ec966101aa1 Mon Sep 17 00:00:00 2001 From: 8chan Date: Sat, 8 Nov 2014 16:58:02 -0800 Subject: This script was breaking boards.html --- js/thread-watcher.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/thread-watcher.js') diff --git a/js/thread-watcher.js b/js/thread-watcher.js index 625e95e0..b66dc657 100644 --- a/js/thread-watcher.js +++ b/js/thread-watcher.js @@ -142,6 +142,10 @@ watchlist.exists = function(sel) { }; $(document).ready(function(){ + if (!(active_page == 'thread' || active_page == 'index')) { + return; + } + //Append the watchlist toggle button. $('.boardlist').append('[ watchlist ]'); //Append a watch thread button after every OP. -- cgit v1.3 From 5267098cb822b489a1634cb2e5b7620b49a4f4ae Mon Sep 17 00:00:00 2001 From: 8chan Date: Fri, 21 Nov 2014 23:34:03 -0800 Subject: Make bottom watchlist-toggle work --- js/thread-watcher.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'js/thread-watcher.js') diff --git a/js/thread-watcher.js b/js/thread-watcher.js index b66dc657..7f20e028 100644 --- a/js/thread-watcher.js +++ b/js/thread-watcher.js @@ -147,15 +147,16 @@ $(document).ready(function(){ } //Append the watchlist toggle button. - $('.boardlist').append('[ watchlist ]'); + $('.boardlist').append('[ watchlist ]'); //Append a watch thread button after every OP. - $('.op>.intro').append('[Watch Thread]'); + $('.op>.intro').append('[Watch Thread]'); //Draw the watchlist, hidden. watchlist.render(); //Show or hide the watchlist. - $('#watchlist-toggle').on('click', function(e) { + $('.watchlist-toggle').on('click', function(e) { + e.preventDefault(); //if ctrl+click, reset the watchlist. if (e.ctrlKey) { watchlist.render(true); @@ -169,7 +170,8 @@ $(document).ready(function(){ //Trigger the watchlist add function. //The selector is passed as an argument in case the page is not a thread. - $('.watchThread').on('click', function() { + $('.watchThread').on('click', function(e) { + e.preventDefault(); watchlist.add(this).render(); }); -- cgit v1.3 From cac428b30ccc2815264b15797e6397d6942b7adc Mon Sep 17 00:00:00 2001 From: Fredrick Brennan Date: Fri, 20 Mar 2015 16:09:21 +0800 Subject: Add some missing i18n tags --- js/comment-toolbar.js | 26 +++++++++++++------------- js/fix-report-delete-submit.js | 8 ++++---- js/inline.js | 4 ++-- js/post-filter.js | 40 ++++++++++++++++++++-------------------- js/thread-watcher.js | 12 ++++++------ 5 files changed, 45 insertions(+), 45 deletions(-) (limited to 'js/thread-watcher.js') diff --git a/js/comment-toolbar.js b/js/comment-toolbar.js index 65bdc529..51aa9808 100644 --- a/js/comment-toolbar.js +++ b/js/comment-toolbar.js @@ -13,7 +13,7 @@ if (active_page == 'thread' || active_page == 'index') { var self = {}; self.rules = { spoiler: { - text: 'Spoiler', + text: _('Spoiler'), key: 's', multiline: false, exclusiveline: false, @@ -21,7 +21,7 @@ if (active_page == 'thread' || active_page == 'index') { suffix:'**' }, italics: { - text: 'Italics', + text: _('Italics'), key: 'i', multiline: false, exclusiveline: false, @@ -29,7 +29,7 @@ if (active_page == 'thread' || active_page == 'index') { suffix: "''" }, bold: { - text: 'Bold', + text: _('Bold'), key: 'b', multiline: false, exclusiveline: false, @@ -37,7 +37,7 @@ if (active_page == 'thread' || active_page == 'index') { suffix: "'''" }, underline: { - text: 'Underline', + text: _('Underline'), key: 'u', multiline: false, exclusiveline: false, @@ -45,7 +45,7 @@ if (active_page == 'thread' || active_page == 'index') { suffix:'__' }, code: { - text: 'Code', + text: _('Code'), key: 'f', multiline: true, exclusiveline: false, @@ -53,7 +53,7 @@ if (active_page == 'thread' || active_page == 'index') { suffix: '[/code]' }, strike: { - text: 'Strike', + text: _('Strike'), key: 'd', multiline:false, exclusiveline:false, @@ -61,7 +61,7 @@ if (active_page == 'thread' || active_page == 'index') { suffix:'~~' }, heading: { - text: 'Heading', + text: _('Heading'), key: 'r', multiline:false, exclusiveline:true, @@ -271,7 +271,7 @@ if (active_page == 'thread' || active_page == 'index') { // add the tab for customizing the format settings if (window.Options && !Options.get_tab('formatting')) { - Options.add_tab('formatting', 'angle-right', 'Customize Formatting'); + Options.add_tab('formatting', 'angle-right', _('Customize Formatting')); Options.extend_tab('formatting', '\