Book Markletss

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top