Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Bookmarklet
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Example=== This example bookmarklet performs a Wikipedia search on any highlighted text in the web browser window. In normal use, the following JavaScript code would be installed to a bookmark in a browser<ref>Tested on [[Mozilla Firefox]], [[Opera (web browser)|Opera]], [[Safari (web browser)|Safari]], and [[Google Chrome|Chrome]]. Does not work in IE7 or IE8. Original source: [http://math-www.uni-paderborn.de/~axel/bookmarklet.html Alex Boldt]</ref> bookmarks toolbar. From then on, after selecting any text, clicking the bookmarklet performs the search. <syntaxhighlight lang="javascript" line="1"> javascript:(function() { function se(d) { return d.selection ? d.selection.createRange().text : d.getSelection() } var s = se(document); for (var i=0; i<frames.length && (s==null || s==''); i++) s = se(frames[i].document); if (!s || s=='') s = prompt('Enter%20search%20terms%20for%20Wikipedia',''); open('https://en.wikipedia.org' + (s ? '/w/index.php?title=Special:Search&search=' + encodeURIComponent(s) : '')).focus(); })(); </syntaxhighlight> Bookmarklets can modify the [[URL|location]], e.g. to save a [[web page]] to the [[Wayback Machine]], <syntaxhighlight lang="javascript"> javascript:location.href='https://web.archive.org/save/'+document.location.href; </syntaxhighlight> Open a new [[web browser]] window or tab, e.g. to show the source of a web resource if the web browser supports the [[view-source URI scheme]], <syntaxhighlight lang="javascript"> javascript:void(window.open('view-source:'+location)); </syntaxhighlight> Show info related to the current [[URL]], e.g., <syntaxhighlight lang="javascript"> javascript:alert('\tdocument.URL\n'+document.URL+'\n\tdocument.lastModified\n'+document.lastModified+'\n\tlocation\n'+location); </syntaxhighlight>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Bookmarklet
(section)
Add topic