Skip to content

Instantly share code, notes, and snippets.

@bamanzi
Created April 22, 2012 02:04
Show Gist options
  • Save bamanzi/2440807 to your computer and use it in GitHub Desktop.
Save bamanzi/2440807 to your computer and use it in GitHub Desktop.
[keysnail] Load current URL in sidebar
ext.add("view-in-sidebar", function() {
toggleSidebar('', false);
var sidebarcmd = document.getElementById('viewURISidebar');
//print(sidebarcmd.getAttribute("sidebarurl"))
//print(sidebarcmd.getAttribute("checked"))
sidebarcmd.removeAttribute("checked");
sidebarcmd.setAttribute("sidebarurl", content.location.href);
sidebarcmd.setAttribute("sidebartitle", content.document.title);
toggleSidebar('viewURISidebar', true);
}, "Load current URL in sidebar");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment