I don't know why that was under the thread conditional?
This commit is contained in:
parent
ec35cb6742
commit
ebd765cc24
@ -12523,7 +12523,7 @@
|
||||
});
|
||||
},
|
||||
initReady: function() {
|
||||
var GMver, err, href, i, threadRoot, v, _i, _len, _ref, _ref1;
|
||||
var GMver, err, href, i, passLink, styleSelector, threadRoot, v, _i, _len, _ref, _ref1;
|
||||
if ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found') {
|
||||
if (Conf['404 Redirect'] && g.VIEW === 'thread') {
|
||||
href = Redirect.to('thread', {
|
||||
@ -12536,6 +12536,16 @@
|
||||
return;
|
||||
}
|
||||
Main.initStyle();
|
||||
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')]);
|
||||
}
|
||||
if (g.VIEW === 'thread' && (threadRoot = $('.thread'))) {
|
||||
Main.initThread(threadRoot);
|
||||
}
|
||||
@ -12560,7 +12570,7 @@
|
||||
}
|
||||
},
|
||||
initThread: function(threadRoot) {
|
||||
var err, errors, passLink, post, postRoot, posts, styleSelector, thread, _i, _len, _ref;
|
||||
var err, errors, post, postRoot, posts, thread, _i, _len, _ref;
|
||||
thread = new Thread(+threadRoot.id.slice(1), g.BOARD);
|
||||
posts = [];
|
||||
_ref = $$('.thread > .postContainer', threadRoot);
|
||||
@ -12585,19 +12595,9 @@
|
||||
Main.handleErrors(errors);
|
||||
}
|
||||
Main.callbackNodes(Thread, [thread]);
|
||||
Main.callbackNodesDB(Post, posts, function() {
|
||||
return Main.callbackNodesDB(Post, posts, function() {
|
||||
return $.event('4chanXInitFinished');
|
||||
});
|
||||
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');
|
||||
});
|
||||
return $.before(styleSelector.previousSibling, [$.tn('['), passLink, $.tn(']\u00A0\u00A0')]);
|
||||
}
|
||||
},
|
||||
callbackNodes: function(klass, nodes) {
|
||||
var cb, i, node;
|
||||
|
||||
@ -12510,7 +12510,7 @@
|
||||
});
|
||||
},
|
||||
initReady: function() {
|
||||
var err, href, threadRoot, _ref;
|
||||
var err, href, passLink, styleSelector, threadRoot, _ref;
|
||||
if ((_ref = d.title) === '4chan - Temporarily Offline' || _ref === '4chan - 404 Not Found') {
|
||||
if (Conf['404 Redirect'] && g.VIEW === 'thread') {
|
||||
href = Redirect.to('thread', {
|
||||
@ -12523,6 +12523,16 @@
|
||||
return;
|
||||
}
|
||||
Main.initStyle();
|
||||
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')]);
|
||||
}
|
||||
if (g.VIEW === 'thread' && (threadRoot = $('.thread'))) {
|
||||
Main.initThread(threadRoot);
|
||||
}
|
||||
@ -12534,7 +12544,7 @@
|
||||
}
|
||||
},
|
||||
initThread: function(threadRoot) {
|
||||
var err, errors, passLink, post, postRoot, posts, styleSelector, thread, _i, _len, _ref;
|
||||
var err, errors, post, postRoot, posts, thread, _i, _len, _ref;
|
||||
thread = new Thread(+threadRoot.id.slice(1), g.BOARD);
|
||||
posts = [];
|
||||
_ref = $$('.thread > .postContainer', threadRoot);
|
||||
@ -12559,19 +12569,9 @@
|
||||
Main.handleErrors(errors);
|
||||
}
|
||||
Main.callbackNodes(Thread, [thread]);
|
||||
Main.callbackNodesDB(Post, posts, function() {
|
||||
return Main.callbackNodesDB(Post, posts, function() {
|
||||
return $.event('4chanXInitFinished');
|
||||
});
|
||||
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');
|
||||
});
|
||||
return $.before(styleSelector.previousSibling, [$.tn('['), passLink, $.tn(']\u00A0\u00A0')]);
|
||||
}
|
||||
},
|
||||
callbackNodes: function(klass, nodes) {
|
||||
var cb, i, node;
|
||||
|
||||
@ -118,6 +118,16 @@ Main =
|
||||
# Something might have gone wrong!
|
||||
Main.initStyle()
|
||||
|
||||
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']
|
||||
|
||||
Main.initThread threadRoot if g.VIEW is 'thread' and threadRoot = $ '.thread'
|
||||
|
||||
<% if (type === 'userscript') { %>
|
||||
@ -152,16 +162,6 @@ Main =
|
||||
Main.callbackNodesDB Post, posts, ->
|
||||
$.event '4chanXInitFinished'
|
||||
|
||||
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']
|
||||
|
||||
callbackNodes: (klass, nodes) ->
|
||||
i = 0
|
||||
cb = klass.callbacks
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user