N
Nairb
Hello,
I was looking over this Mozilla book marklet from squarefree.com and
was wondering if something else could be done with it.
This being the code, which changes some of the style attributes:
javascript
function(){var newSS, styles='* { background: white !
important; color: black !important } :link, :link * { color: #0000EE
!important } :visited, :visited * { color: #551A8B !important }';
if(document.createStyleSheet) {
document.createStyleSheet("javascript:'"+styles+"'"); } else {
newSS=document.createElement('link'); newSS.rel='stylesheet';
newSS.href='data:text/css,'+escape(styles);
document.getElementsByTagName("head")[0].appendChild(newSS); } })();
What I'm wondering, if, and if so what would be the code, I could use
this to add a custom header to the page when viewed (or the button
clicked). Something along the line of a simple document.write('<h>
Custom Heading</h>') line in addition to the previous code?
I was looking over this Mozilla book marklet from squarefree.com and
was wondering if something else could be done with it.
This being the code, which changes some of the style attributes:
javascript
important; color: black !important } :link, :link * { color: #0000EE
!important } :visited, :visited * { color: #551A8B !important }';
if(document.createStyleSheet) {
document.createStyleSheet("javascript:'"+styles+"'"); } else {
newSS=document.createElement('link'); newSS.rel='stylesheet';
newSS.href='data:text/css,'+escape(styles);
document.getElementsByTagName("head")[0].appendChild(newSS); } })();
What I'm wondering, if, and if so what would be the code, I could use
this to add a custom header to the page when viewed (or the button
clicked). Something along the line of a simple document.write('<h>
Custom Heading</h>') line in addition to the previous code?