(→Display user's Wiki page: updated code from expanded view) |
(→User information and communication: changed order) |
||
Regel 46: | Regel 46: | ||
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"> | <pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"> | ||
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for sending PM (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/ucp.php?i=pm&mode=compose&username="+s}})(); | javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for sending PM (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/ucp.php?i=pm&mode=compose&username="+s}})(); | ||
</pre> | |||
==== Display user's forum posts ==== | |||
This script will use the mouse-selected (highlighted) text on the page to display the user's forum posts. If you don't highlight a username, the script will ask for one to be entered. | |||
Once on that page, selecting any entry of the user's name will move to the user's forum profile data. | |||
<!-- Do not modify this code directly. Go to the talk page to modify the formatted code and then compress it and paste the result below --> | |||
<pre style="white-space:-moz-pre-wrap; white-space:-pre-wrap; white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;"> | |||
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username to view forum posts (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/search.php?keywords=&terms=all&sv=0&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search&author="+s}})(); | |||
</pre> | </pre> | ||
Regel 63: | Regel 73: | ||
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki contributions (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/Special:Contributions/"+s}})(); | javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki contributions (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/Special:Contributions/"+s}})(); | ||
</pre> | </pre> | ||
[[Category:Bookmarklets]] | [[Category:Bookmarklets]] |
Versie van 5 jun 2014 20:04
A bookmarklet is a bookmark stored in a web browser that contains JavaScript commands to extend the browser's functionality through a single mouse click. For instance, a bookmarklet might enable the user to select an editor username on a page, click the bookmarklet, and be taken directly to the private message page with the username already entered.
Adding to a browser
Chrome
- Left click on the "Customization and control Google Chrome" menu button in the right upper corner of your browser. (three horizonal bars)
- Left click on "Bookmarks"
- Left click on "Bookmark Manager"
- In the left window pane, navigate to where you want to add the bookmarklet.
- In the main window pane, right click to see the context menu.
- Left click on "Add page"
- In the "Name" box, enter "Wazer Profile" or any name you prefer.
- In the "URL" box, paste the code your previously copied.
While other methods exist, this method should always work.
Firefox
Defined scripts
The following bookmarklet scripts could be helpful to map editors. Following the instructions above for adding a bookmarklet based on your browser, select the code below with your mouse, highlighting all the code inside the box. Use that code to paste into the bookmark as the target or location.
Formatted (viewable) code can be seen on the talk page.
User information and communication
Create private message to user
This script will use the mouse-selected (highlighted) text on the page to prepare a private message page with the username already populated. If you don't highlight a username, the script will ask for one to be entered.
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for sending PM (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/ucp.php?i=pm&mode=compose&username="+s}})();
Display user's forum posts
This script will use the mouse-selected (highlighted) text on the page to display the user's forum posts. If you don't highlight a username, the script will ask for one to be entered.
Once on that page, selecting any entry of the user's name will move to the user's forum profile data.
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username to view forum posts (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://www.waze.com/forum/search.php?keywords=&terms=all&sv=0&sc=1&sf=all&sr=posts&sk=t&sd=d&st=0&ch=300&t=0&submit=Search&author="+s}})();
Display user's Wiki page
This script will use the mouse-selected (highlighted) text on the page to display the user's Wiki page. If you don't highlight a username, the script will ask for one to be entered.
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki user page (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/User:"+s}})();
Display user's Wiki contributions
This script will use the mouse-selected (highlighted) text on the page to display the user's Wiki contributions. If you don't highlight a username, the script will ask for one to be entered.
javascript:(function(){var s='';if(window.getSelection){s=window.getSelection()}else if(document.getSelection){s=document.getSelection()}else if(document.selection){s=document.selection.createRange().text}if(s==""){var s=prompt("Enter Username for Wiki contributions (or highlight name before selecting bookmarklet).")}if((s!="")&&(s!=null)){window.location.href="http://wiki.waze.com/wiki/Special:Contributions/"+s}})();