diff --git a/CHANGELOG.md b/CHANGELOG.md index b90084416..82ac11f5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ seaweedchan - Fix boards with previously deleted archives not switching to new archives +ihavenoface: +- 4chan Pass link by the style selector + ### 1.1.8 - 2013-05-01 seaweedchan: - Fix QR not clearing on submit with Posting Success Notifications disabled diff --git a/builds/4chan-X.js b/builds/4chan-X.js index cb9baf60b..bf9e3db6d 100644 --- a/builds/4chan-X.js +++ b/builds/4chan-X.js @@ -9897,7 +9897,7 @@ } }, initReady: function() { - var board, boardChild, err, errors, href, posts, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; + var board, boardChild, err, errors, href, passLink, posts, styleSelector, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { @@ -9952,6 +9952,16 @@ $.event('4chanXInitFinished'); return Main.checkUpdate(); }); + if (styleSelector = $.id('styleSelector')) { + passLink = $.el('a', { + textContent: '4chan Pass', + href: 'javascript:;' + }); + $.on(passLink, 'click', function() { + return window.open('//sys.4chan.org/auth', 'This will steal your data.', 'left=0,top=0,width=500,height=255,toolbar=0,resizable=0'); + }); + $.before(styleSelector.previousSibling, [$.tn('['), passLink, $.tn(']\u00A0\u00A0')]); + } return; } $.event('4chanXInitFinished'); diff --git a/builds/4chan-X.user.js b/builds/4chan-X.user.js index 9fdd90821..ea6397e1a 100644 --- a/builds/4chan-X.user.js +++ b/builds/4chan-X.user.js @@ -9920,7 +9920,7 @@ } }, initReady: function() { - var board, boardChild, err, errors, href, posts, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; + var board, boardChild, err, errors, href, passLink, posts, styleSelector, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { @@ -9975,6 +9975,16 @@ $.event('4chanXInitFinished'); return Main.checkUpdate(); }); + if (styleSelector = $.id('styleSelector')) { + passLink = $.el('a', { + textContent: '4chan Pass', + href: 'javascript:;' + }); + $.on(passLink, 'click', function() { + return window.open('//sys.4chan.org/auth', 'This will steal your data.', 'left=0,top=0,width=500,height=255,toolbar=0,resizable=0'); + }); + $.before(styleSelector.previousSibling, [$.tn('['), passLink, $.tn(']\u00A0\u00A0')]); + } return; } $.event('4chanXInitFinished'); diff --git a/builds/crx/script.js b/builds/crx/script.js index db5a7cec0..7aa2df050 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -9901,7 +9901,7 @@ } }, initReady: function() { - var board, boardChild, err, errors, href, posts, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; + var board, boardChild, err, errors, href, passLink, posts, styleSelector, thread, threadChild, threads, _i, _j, _len, _len1, _ref, _ref1; if (d.title === '4chan - 404 Not Found') { if (Conf['404 Redirect'] && g.VIEW === 'thread') { @@ -9956,6 +9956,16 @@ $.event('4chanXInitFinished'); return Main.checkUpdate(); }); + if (styleSelector = $.id('styleSelector')) { + passLink = $.el('a', { + textContent: '4chan Pass', + href: 'javascript:;' + }); + $.on(passLink, 'click', function() { + return window.open('//sys.4chan.org/auth', 'This will steal your data.', 'left=0,top=0,width=500,height=255,toolbar=0,resizable=0'); + }); + $.before(styleSelector.previousSibling, [$.tn('['), passLink, $.tn(']\u00A0\u00A0')]); + } return; } $.event('4chanXInitFinished'); diff --git a/src/General/Main.coffee b/src/General/Main.coffee index d3c8cf2d9..f2691168e 100644 --- a/src/General/Main.coffee +++ b/src/General/Main.coffee @@ -199,8 +199,19 @@ Main = $.event '4chanXInitFinished' Main.checkUpdate() + if styleSelector = $.id 'styleSelector' + passLink = $.el 'a', + textContent: '4chan Pass' + href: 'javascript:;' + $.on passLink, 'click', -> + window.open '//sys.4chan.org/auth', + 'This will steal your data.' + 'left=0,top=0,width=500,height=255,toolbar=0,resizable=0' + $.before styleSelector.previousSibling, [$.tn '['; passLink, $.tn ']\u00A0\u00A0'] + return + $.event '4chanXInitFinished' Main.checkUpdate()