Remove last uses of $.globalEval.
This commit is contained in:
parent
25dd9d5985
commit
48022bb31b
@ -103,7 +103,8 @@ Header =
|
|||||||
$('#navtopright', footer).id = 'navbotright'
|
$('#navtopright', footer).id = 'navbotright'
|
||||||
$('#settingsWindowLink', footer).id = 'settingsWindowLinkBot'
|
$('#settingsWindowLink', footer).id = 'settingsWindowLinkBot'
|
||||||
$.before absbot, footer
|
$.before absbot, footer
|
||||||
$.globalEval 'window.cloneTopNav = function() {};'
|
$.global ->
|
||||||
|
window.cloneTopNav = ->
|
||||||
if (Header.bottomBoardList = $ g.SITE.selectors.boardListBottom)
|
if (Header.bottomBoardList = $ g.SITE.selectors.boardListBottom)
|
||||||
for a in $$ 'a', Header.bottomBoardList
|
for a in $$ 'a', Header.bottomBoardList
|
||||||
a.className = 'current' if a.hostname is location.hostname and a.pathname.split('/')[1] is g.BOARD.ID
|
a.className = 'current' if a.hostname is location.hostname and a.pathname.split('/')[1] is g.BOARD.ID
|
||||||
|
|||||||
@ -12,17 +12,16 @@ Fourchan =
|
|||||||
unless $.hasClass pre, 'prettyprinted'
|
unless $.hasClass pre, 'prettyprinted'
|
||||||
pre.innerHTML = e.detail.html
|
pre.innerHTML = e.detail.html
|
||||||
$.addClass pre, 'prettyprinted'
|
$.addClass pre, 'prettyprinted'
|
||||||
$.globalEval '''
|
$.global ->
|
||||||
window.addEventListener('prettyprint', function(e) {
|
window.addEventListener('prettyprint', (e) ->
|
||||||
window.dispatchEvent(new CustomEvent('prettyprint:cb', {
|
window.dispatchEvent(new CustomEvent('prettyprint:cb', {
|
||||||
detail: {
|
detail: {
|
||||||
ID: e.detail.ID,
|
ID: e.detail.ID,
|
||||||
i: e.detail.i,
|
i: e.detail.i,
|
||||||
html: prettyPrintOne(e.detail.html)
|
html: window.prettyPrintOne(e.detail.html)
|
||||||
}
|
}
|
||||||
}));
|
}))
|
||||||
}, false);
|
, false)
|
||||||
'''
|
|
||||||
Callbacks.Post.push
|
Callbacks.Post.push
|
||||||
name: 'Parse [code] tags'
|
name: 'Parse [code] tags'
|
||||||
cb: Fourchan.code
|
cb: Fourchan.code
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user