From 26fc5d81b7c5be2ad89467353f504eb6b80208c5 Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Mon, 28 Oct 2013 02:06:10 -0700 Subject: [PATCH] Let's just remove the nodes. Seems to fix a catalog bug in Chrome. --- LICENSE | 2 +- builds/appchan-x.user.js | 7 +++---- builds/crx/script.js | 7 +++---- src/Theming/Style.coffee | 4 ++-- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/LICENSE b/LICENSE index 979430286..bbe9f761a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.5.1 - 2013-10-20 +* appchan x - Version 2.5.1 - 2013-10-28 * * 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 6b950ff37..4c6362079 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -20,7 +20,7 @@ // ==/UserScript== /* -* appchan x - Version 2.5.1 - 2013-10-20 +* appchan x - Version 2.5.1 - 2013-10-28 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -12688,10 +12688,9 @@ i = addedNodes.length; while (i--) { node = addedNodes[i]; - 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; + 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))) { + $.rm(node); } - node.disabled = true; } }, matrix: function() { diff --git a/builds/crx/script.js b/builds/crx/script.js index 64b331a60..e87054f8e 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.5.1 - 2013-10-20 +* appchan x - Version 2.5.1 - 2013-10-28 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -12684,10 +12684,9 @@ i = addedNodes.length; while (i--) { node = addedNodes[i]; - 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; + 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))) { + $.rm(node); } - node.disabled = true; } }, matrix: function() { diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index e50fa9a4b..f48a03f55 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -86,11 +86,11 @@ Style = while i-- node = addedNodes[i] - continue if node.nodeName is 'STYLE' and node.id or + $.rm node unless node.nodeName is 'STYLE' and node.id or !['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 - node.disabled = true + return matrix: ->