diff --git a/LICENSE b/LICENSE index cc922690f..87c00db37 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.3.8 - 2013-08-25 +* appchan x - Version 2.3.8 - 2013-08-30 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js index 2786ac366..62698f4e5 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -20,7 +20,7 @@ // ==/UserScript== /* -* appchan x - Version 2.3.8 - 2013-08-25 +* appchan x - Version 2.3.8 - 2013-08-30 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -12557,30 +12557,19 @@ Style.padding(); Style.iconPositions(); if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { - $.on(exLink, "click", function() { + return $.on(exLink, "click", function() { return setTimeout(Rice.nodes, 100); }); } - if (g.VIEW === 'catalog') { - if (!$.id('threads').children.length) { - return setTimeout((function() { - return $.globalEval('fourcat.init(); fourcat.loadCatalog(catalog);'); - }), 1000); - } - } }, observe: function() { var onMutationObserver; - if (window.MutationObserver) { - Style.observer = new MutationObserver(onMutationObserver = Style.wrapper); - return Style.observer.observe(d.head, { - childList: true, - subtree: true - }); - } else { - return $.on(d.head, 'DOMNodeInserted', Style.wrapper); - } + Style.observer = new MutationObserver(onMutationObserver = Style.wrapper); + return Style.observer.observe(d.head, { + childList: true, + subtree: true + }); }, wrapper: function() { var first; @@ -12590,11 +12579,7 @@ }; Style.remStyle(first); if (d.readyState === 'complete') { - if (Style.observer) { - return Style.observer.disconnect(); - } else { - return $.off(d, 'DOMNodeInserted', Style.wrapper); - } + return Style.observer.disconnect(); } }, remStyle: function(_arg) { @@ -12607,7 +12592,7 @@ if (node.nodeName === 'STYLE' && node.id || !['LINK', 'STYLE'].contains(node.nodeName) || node.rel && (!/stylesheet/.test(node.rel) || /flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data') || /\.typeset/.test(node.textContent)) { continue; } - $.rm(node); + node.disabled = true; } }, matrix: function(foreground, background) { diff --git a/builds/crx/script.js b/builds/crx/script.js index 9ce7405fd..5fb570466 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.3.8 - 2013-08-25 +* appchan x - Version 2.3.8 - 2013-08-30 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -12551,30 +12551,19 @@ Style.padding(); Style.iconPositions(); if (exLink = $("#navtopright .exlinksOptionsLink", d.body)) { - $.on(exLink, "click", function() { + return $.on(exLink, "click", function() { return setTimeout(Rice.nodes, 100); }); } - if (g.VIEW === 'catalog') { - if (!$.id('threads').children.length) { - return setTimeout((function() { - return $.globalEval('fourcat.init(); fourcat.loadCatalog(catalog);'); - }), 1000); - } - } }, observe: function() { var onMutationObserver; - if (window.MutationObserver) { - Style.observer = new MutationObserver(onMutationObserver = Style.wrapper); - return Style.observer.observe(d.head, { - childList: true, - subtree: true - }); - } else { - return $.on(d.head, 'DOMNodeInserted', Style.wrapper); - } + Style.observer = new MutationObserver(onMutationObserver = Style.wrapper); + return Style.observer.observe(d.head, { + childList: true, + subtree: true + }); }, wrapper: function() { var first; @@ -12584,11 +12573,7 @@ }; Style.remStyle(first); if (d.readyState === 'complete') { - if (Style.observer) { - return Style.observer.disconnect(); - } else { - return $.off(d, 'DOMNodeInserted', Style.wrapper); - } + return Style.observer.disconnect(); } }, remStyle: function(_arg) { @@ -12601,7 +12586,7 @@ if (node.nodeName === 'STYLE' && node.id || !['LINK', 'STYLE'].contains(node.nodeName) || node.rel && (!/stylesheet/.test(node.rel) || /flags.*\.css$/.test(href = node.href) || href.slice(0, 4) === 'data') || /\.typeset/.test(node.textContent)) { continue; } - $.rm(node); + node.disabled = true; } }, matrix: function(foreground, background) { diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index 9f2a8fd48..0f9c14cb8 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -67,30 +67,19 @@ Style = if exLink = $ "#navtopright .exlinksOptionsLink", d.body $.on exLink, "click", -> setTimeout Rice.nodes, 100 - - if g.VIEW is 'catalog' - unless $.id('threads').children.length - # Race conditions - setTimeout (-> $.globalEval 'fourcat.init(); fourcat.loadCatalog(catalog);'), 1000 observe: -> - if window.MutationObserver - Style.observer = new MutationObserver onMutationObserver = Style.wrapper - Style.observer.observe d.head, - childList: true - subtree: true - else - $.on d.head, 'DOMNodeInserted', Style.wrapper + Style.observer = new MutationObserver onMutationObserver = Style.wrapper + Style.observer.observe d.head, + childList: true + subtree: true wrapper: -> first = {addedNodes: d.head.children} - Style.remStyle(first) + Style.remStyle first if d.readyState is 'complete' - if Style.observer - Style.observer.disconnect() - else - $.off d, 'DOMNodeInserted', Style.wrapper + Style.observer.disconnect() remStyle: ({addedNodes}) -> i = addedNodes.length @@ -101,7 +90,7 @@ Style = !['LINK', 'STYLE'].contains(node.nodeName) or node.rel and ((!/stylesheet/.test(node.rel) or /flags.*\.css$/.test(href = node.href) or href[..3] is 'data')) or /\.typeset/.test node.textContent - $.rm node + node.disabled = true return matrix: (foreground, background) ->