summaryrefslogtreecommitdiff
path: root/simplyread.js
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2011-08-14 20:31:59 +0100
committerNick White <git@njw.me.uk>2011-08-14 20:31:59 +0100
commit675f54b98b774c533be17f82b72a1a32028a3457 (patch)
tree89f728c10f7a2d879f49b9f51f00b324a20acc4d /simplyread.js
parent185f14544479b960a557ffde0eb8ab979941ecf3 (diff)
Disable inline style tags
Diffstat (limited to 'simplyread.js')
-rwxr-xr-xsimplyread.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/simplyread.js b/simplyread.js
index 5eb4614..dff7019 100755
--- a/simplyread.js
+++ b/simplyread.js
@@ -53,6 +53,8 @@ function simplyread()
fresh.innerHTML = fresh.innerHTML.replace(/<\/?font[^>]*>/g, "");
fresh.innerHTML = fresh.innerHTML.replace(/style="[^"]*"/g, "");
fresh.innerHTML = fresh.innerHTML.replace(/<\/?a[^>]*>/g, "");
+ fresh.innerHTML = fresh.innerHTML.replace(/<\/?span[^>]*>/g, "");
+ fresh.innerHTML = fresh.innerHTML.replace(/<style[^>]*>/g, "<style media=\"aural\">");
for (var i = 0; i < doc.styleSheets.length; i++)
doc.styleSheets[i].disabled = true;