Go up buttons
Buttons
The buttons in this set each provide a click to navigate up levels in the current URL (for example, from http://custombuttons2.com/forum/buttons/ to http://custombuttons2.com/forum/), and/or a menu that lists all the levels you can go to in the current URL. The menu is the same across all buttons, be it in the form of a context menu or a dropdown menu. If you were in this post for example:
http://custombuttons2.com/forum/buttons/buttons-database/go-buttons.html
The menu would be as follows:
- http://custombuttons2.com/forum/buttons/buttons-database/
- http://custombuttons2.com/forum/buttons/
- http://custombuttons2.com/forum/
- http://custombuttons2.com/
Go up (no menu):
- Left click the button to go up a level in the current URL.
Go up (context menu):
- Left click the button to go up a level in the current URL.
- Right click the button to see the context menu of levels you can go to in the current URL.
Go up (menu button):
- Left click the button to see the menu of levels you can go to in the current URL.
Go up (drop-marker menu button):
- Left click the main button to go up a level in the current URL.
- Left click the drop-down marker to see the menu of levels you can go to in the current URL.
Behavior
| Action | Behavior |
|---|---|
(No menu, Context menu and Drop-marker menu buttons):
| |
(Drop-marker menu button):
| |
(Menu button):
| |
(Context menu button):
|
รุ่น
รหัส
/*
Left click the button to go up a level in the current URL.
For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
Rawny ^^
*/ Init
// ***** IMAGES/ICONS ***** // var EnabledImg = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAwBQTFRFAAAAE1QND3MOM1MxMXUxLXJPYm9RDIgJEZgMF5QuD7EIMK4vC8YIB9cGC/IJMPUvPNpEWZE2XY9TWK9ObpFvTvtKYM1Rbu5xarCOp6t0mZiXmbeTpKeTqKirt7i4mOyRAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAuS4KZgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAACKSURBVChThc/rDsIgDAXgUre1Y4A6mbcVfP+nRIqZJsbE848vJxyA8hX4Bet0+nBt5PE8Xd9SYZ4eF143gXLj/bIc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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH/eQtgAAAQB0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AFP3ByUAAAAYdEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My4zNqnn4iUAAABqSURBVChThY9RDsMwCEOhuGDuf+AMiNJK06T5j4cBI+tL8gsk8OJyJBzxkAKOpPEQWWHufj9EaNjK7RErAWbqU6eQ0QAcBzFXrBxRIKvXwbzHFO64lA2ywUhjTXQeUPn2L4Sq1uI++/fbD8DUk3T7ilMCAAAAAElFTkSuQmCC"; // ***** VARS ***** // var button = this; var URLs = []; // ***** FUNCTIONS ***** // function getURLs() { //This function is adapted from the one used by the Uppity extension by Anthony Lieuallen: https://addons.mozilla.org/en-US/firefox/addon/869 var loc = gBrowser.contentDocument.location; URLs = []; try { //check for validity if ('about:'==loc.protocol) return; //get the URL var path=loc.href; //strip off the scheme and host path=path.replace(/^.*:\/\/[^\/]*\//, ''); //and the trailing slash if there path=path.replace(/\/$/, ''); //and any extra leading slashes path=path.replace(/^\/+/, ''); var host=loc.host; var scheme=loc.protocol+'//'; var emptyPath=(''==path); //strip hash if there if (path.indexOf('#')>0) { path=path.replace(/#.*/, ''); URLs[URLs.length]=scheme+host+'/'+path; } //strip querystring if there if (path.indexOf('?')>0) { path=path.replace(/\?.*/, ''); URLs[URLs.length]=scheme+host+'/'+path; } //strip files/directories if there while (path.indexOf('/')>0) { path=path.replace(/\/[^\/]*$/, ''); URLs[URLs.length]=scheme+host+'/'+path+'/'; } //host only if (!emptyPath) URLs[URLs.length]=scheme+host+'/'; //strip subdomains if there if (!host.match(/^([0-9]+\.)+$/)) { // if it's not a numeric IP var hostSuffix=''; // strip port var x=host.lastIndexOf(':'); if (x>0) { hostSuffix=host.substr(x); host=host.substr(0, x); } // strip TLD hostSuffix=host.substr(host.length-6)+hostSuffix; host=host.substr(0, host.length-6); while (-1!=host.indexOf('.')) { host=host.replace(/[^.]*\./, ''); URLs[URLs.length]=scheme+host+hostSuffix+'/'; } } } catch (e) { } } function Reload() { getURLs(); if (URLs.length > 0) { button.tooltipText = 'Go up to: \n '+URLs[0]; button.image = EnabledImg; } else { button.tooltipText = 'Nowhere to go up to'; button.image = DisabledImg; } } // ***** MOUSE/EVENT HANDLING ***** // this.leftclick = function(evt) { getURLs(); if (URLs.length > 0) { loadURI(URLs[0]); } } function Closed(event) { // Remove event listener window.removeEventListener("focus", Reload, true); } // ***** INITIALISATION ***** // this.setAttribute('onclick', 'gQuot(event, this)'); // Calls the Global MouseClick handler gQuot this.setAttribute('ondblclick', 'gQuot(event, this)'); window.addEventListener("focus", Reload, true); window.onclose = Closed; // ***** ATTRIBUTES ***** // this.setAttribute('author','Rawny'); this.setAttribute('version','1.3'); this.setAttribute('homepage', 'http://custombuttons2.com/forum/buttons/buttons-database/go-buttons.html'); this.setAttribute('dependency','FF2.0*, FL1.0*, TB2.0*, CB2 2.0.5*'); this.setAttribute('status','Complete') this.setAttribute('public',true);
คู่มือการใช้งาน
Left click the button to go up a level in the current URL. For example, from "http://custombuttons2.com/forum/buttons/" to "http://custombuttons2.com/forum/"
รายละเอียด
Rawny
My buttons


Thankyou for this button !
I have chosen the "Go up (context menu)" and it works great!
With this button, you don't need the firefox addon "Parent Folder", so that's a big benefit.
On Right click, it shows the list of levels of the current URL, but you can also click any one of those listed levels and it takes you there !
RATING: 5 stars out of 5 stars !
Thankyou SO MUCH rawny !!
Custom Buttons² was not found: find out why...
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Posted with the theme Pluralism