Created
May 12, 2016 16:42
-
-
Save sikofitt/f7c5aaaa9cbb44e48f80d11215716258 to your computer and use it in GitHub Desktop.
Reformat a page with javascript using a bookmark.
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() { | |
var webFont = document.createElement('script'); | |
webFont.src = ('https:' == document.location.protocol ? 'https' : 'http') | |
+'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; | |
webFont.type = 'text/javascript'; | |
webFont.async = true; | |
document.querySelector('body').appendChild(webFont); | |
WebFontConfig = { | |
google: { | |
families: [ 'Open+Sans:300:latin,latin-ext' ] | |
} | |
}; | |
var elem = document.querySelectorAll( prompt('Enter an element') ); | |
var i = 0; | |
while(i < elem.length) { | |
elem[i].style.fontWeight = 300; | |
elem[i].style.fontFamily = 'Open Sans'; | |
elem[i].style.fontSize = '18px'; | |
i++; | |
} | |
return true; | |
}).call(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment