Skip to content

Instantly share code, notes, and snippets.

@LouCypher
Created July 8, 2013 03:45
Show Gist options
  • Save LouCypher/67a7418280593f6fcb15 to your computer and use it in GitHub Desktop.
Save LouCypher/67a7418280593f6fcb15 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Orion
// @namespace http://userscripts.org/users/12
// @include *
// @grant none
// ==/UserScript==
if (typeof Application === "object" && "activeWindow" in Application) {
// Run a function with chrome privileges!
Application.windows[0]._window.openPreferences();
// Manipulate document objects in all tabs
var tabs = Application.activeWindow.tabs;
for (var i = 0; i < tabs.length; i++) {
tabs[i].document.title = "PWNED!";
}
// Access preferences
Components.utils.import("resource://gre/modules/Services.jsm");
alert("Your browser home page is " + Services.prefs.getCharPref("browser.startup.homepage"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment