General
: K-Meleon Forum
General discussion about K-Meleon.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=siria] LOL, now he has nothing! :D Okay, but am a bloody JS beginner who was just a bit inspired by your "innerHTML". But my dabbling is certainly not perfect, and it adds the URL visibly. Anyway, the easiest way would probably be to look at the scripts of existing addons :cool: Personally I like best his version with adding the URL as link to the visible page content. Don't some youtube macros add links to the top? Perhaps there's also a hint in those scripts? Okay, after some experimenting, perhaps try this, it adds the URL at the top, with a line under it: [color=blue]$_code="var x=document.body.innerHTML; document.body.innerHTML=\"URL: \" + document.location + \"<br><hr>\" +x ;document.close();"; injectJS($_code);[/color] But haven't tried as macro yet. If the syntax is right, you should see the same result as when typing into URL bar: javascript:var x=document.body.innerHTML; document.body.innerHTML="URL: " + document.location + "<br><hr>" +x ;document.close(); But have tested this only on the very basic Forum page here yet. Just a starting point. The html snippet could certainly be modified to show the URL as clickable link, by adding <a> tags or such in the right places ;-) It could get some formatting... it could be added with or without an own background color... it could easily be added on top or at bottom or invisibly (<!-->) or not at all, depending on some user pref... it could this and that, you see why my macros sizes tend to explode and then never get finished ;-) Edit: Couldnt stop, and am starting to like this function, so... This adds actually a clickable link, though so far only tested in URL bar like a bookmarklet, not macro syntax yet: [color=blue]javascript:var x=document.body.innerHTML; document.body.innerHTML="URL: <a[i] [/i]href='" + document.location + "'>" + document.location + "</a><br><hr><br>" +x ;document.close();[/color][/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development