summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcss/readability.css2
-rwxr-xr-xjs/readability-0.1.js2
-rwxr-xr-xjs/readability-start.js4
3 files changed, 5 insertions, 3 deletions
diff --git a/css/readability.css b/css/readability.css
index 04296f9..524e1c0 100755
--- a/css/readability.css
+++ b/css/readability.css
@@ -57,7 +57,7 @@
#readFooter {
display: block;
border-top: 1px solid #333;
- height: 360px :
+ height: 360px;
margin-bottom: 260px;
text-align: center;
}
diff --git a/js/readability-0.1.js b/js/readability-0.1.js
index 5b153df..d1a2ccb 100755
--- a/js/readability-0.1.js
+++ b/js/readability-0.1.js
@@ -51,7 +51,7 @@ function grabArticle() {
// REMOVES ALL STYLESHEETS ...
for (var k=0;k < document.styleSheets.length; k++) {
- if (document.styleSheets[k].href != null && document.styleSheets[k].href.lastIndexOf("arc90.com/experiments/readability") == -1) {
+ if (document.styleSheets[k].href != null && document.styleSheets[k].href.lastIndexOf("readability") == -1) {
document.styleSheets[k].disabled = true;
}
}
diff --git a/js/readability-start.js b/js/readability-start.js
index 9536386..834984e 100755
--- a/js/readability-start.js
+++ b/js/readability-start.js
@@ -2,9 +2,11 @@ var style = "style-newspaper";
var size = "size-large";
var margin = "margin-wide";
+var baseHref = window.location.toString().match(/.*\//);
+
var linkStringStart = "javascript:(function(){";
-var linkStringEnd = "';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='http://lab.arc90.com/experiments/readability/js/readability-0.1.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='http://lab.arc90.com/experiments/readability/css/readability.css';_readability_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='http://lab.arc90.com/experiments/readability/css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();";
+var linkStringEnd = "';_readability_script=document.createElement('SCRIPT');_readability_script.type='text/javascript';_readability_script.src='" + baseHref + "js/readability-0.1.js?x='+(Math.random());document.getElementsByTagName('head')[0].appendChild(_readability_script);_readability_css=document.createElement('LINK');_readability_css.rel='stylesheet';_readability_css.href='" + baseHref + "css/readability.css';_readability_css.type='text/css';_readability_css.media='screen';document.getElementsByTagName('head')[0].appendChild(_readability_css);_readability_print_css=document.createElement('LINK');_readability_print_css.rel='stylesheet';_readability_print_css.href='" + baseHref + "css/readability-print.css';_readability_print_css.media='print';_readability_print_css.type='text/css';document.getElementsByTagName('head')[0].appendChild(_readability_print_css);})();";
$(document).ready(function() {