From 80b60dfa84bfaee7f8d642b8d5b616aa3f18acee Mon Sep 17 00:00:00 2001 From: Zixaphir Date: Fri, 5 Jul 2013 11:03:55 -0700 Subject: [PATCH] Fix flags on /sp/. --- LICENSE | 2 +- builds/appchan-x.user.js | 6 +++--- builds/crx/script.js | 6 +++--- src/Theming/Style.coffee | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index d210f79da..520f2a55c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ /* -* appchan x - Version 2.1.3 - 2013-07-04 +* appchan x - Version 2.1.3 - 2013-07-05 * * 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 362e0cad7..d11c853e1 100644 --- a/builds/appchan-x.user.js +++ b/builds/appchan-x.user.js @@ -18,7 +18,7 @@ // ==/UserScript== /* -* appchan x - Version 2.1.3 - 2013-07-04 +* appchan x - Version 2.1.3 - 2013-07-05 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -11488,7 +11488,7 @@ }, headCount: 12, remStyle: function() { - var i, node, nodes; + var href, i, node, nodes; nodes = d.head.children; i = nodes.length; @@ -11497,7 +11497,7 @@ return; } node = nodes[i]; - if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && node.href.slice(0, 4) !== 'data')) { + if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && !/static\.4chan\.org\/css\/flags\.507\.css/.test(href = node.href) && href.slice(0, 4) !== 'data')) { Style.headCount--; $.rm(node); } diff --git a/builds/crx/script.js b/builds/crx/script.js index b3ff5c351..b2a1f2ad4 100644 --- a/builds/crx/script.js +++ b/builds/crx/script.js @@ -1,6 +1,6 @@ // Generated by CoffeeScript /* -* appchan x - Version 2.1.3 - 2013-07-04 +* appchan x - Version 2.1.3 - 2013-07-05 * * Licensed under the MIT license. * https://github.com/zixaphir/appchan-x/blob/master/LICENSE @@ -11477,7 +11477,7 @@ }, headCount: 12, remStyle: function() { - var i, node, nodes; + var href, i, node, nodes; nodes = d.head.children; i = nodes.length; @@ -11486,7 +11486,7 @@ return; } node = nodes[i]; - if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && node.href.slice(0, 4) !== 'data')) { + if ((node.nodeName === 'STYLE' && !node.id) || (("" + node.rel).contains('stylesheet') && !/static\.4chan\.org\/css\/flags\.507\.css/.test(href = node.href) && href.slice(0, 4) !== 'data')) { Style.headCount--; $.rm(node); } diff --git a/src/Theming/Style.coffee b/src/Theming/Style.coffee index c2ae89c8b..20c33aa05 100644 --- a/src/Theming/Style.coffee +++ b/src/Theming/Style.coffee @@ -114,7 +114,7 @@ Style = while i-- return unless Style.headCount node = nodes[i] - if (node.nodeName is 'STYLE' and !node.id) or ("#{node.rel}".contains('stylesheet') and node.href[..3] isnt 'data') + if (node.nodeName is 'STYLE' and !node.id) or ("#{node.rel}".contains('stylesheet') and !/static\.4chan\.org\/css\/flags\.507\.css/.test(href = node.href) and href[..3] isnt 'data') Style.headCount-- $.rm node return