Last active
December 25, 2015 04:29
-
-
Save rrreese/6917412 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://raw.github.com/rrreese/SafariBooksStyleReplace/master/styleReplace.js';})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initStyleReplace() { | |
(window.myBookmarklet = function() { | |
$(".htmlcontent").css("font-family", "Verdana"); | |
//This removes the floating div that apears when you select text | |
BvD.Layer = function(){} | |
})(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var v = "1.8.2"; | |
if (window.jQuery === undefined || window.jQuery.fn.jquery < v) { | |
var done = false; | |
var script = document.createElement("script"); | |
script.src = "http://ajax.googleapis.com/ajax/libs/jquery/" + v + "/jquery.min.js"; | |
script.onload = script.onreadystatechange = function(){ | |
if (!done && (!this.readyState || this.readyState == "loaded" || this.readyState == "complete")) { | |
done = true; | |
initStyleReplace(); | |
} | |
}; | |
document.getElementsByTagName("head")[0].appendChild(script); | |
} else { | |
initStyleReplace(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment