Skip to content

Instantly share code, notes, and snippets.

@cers
Created March 19, 2009 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cers/81495 to your computer and use it in GitHub Desktop.
Save cers/81495 to your computer and use it in GitHub Desktop.
CmdUtils.CreateCommand({
name: "inspect",
description: "highlight the current element",
execute: function() {
CmdUtils.loadJQuery(function(){
CmdUtils.injectJavascript("http://www.keyframesandcode.com/resources/javascript/jQuery/highlight/jquery.highlight.js",
function() {
var d = CmdUtils.getDocumentInsecure();
var w = CmdUtils.getWindowInsecure();
if (!d.getElementById("ubiquityCss"))
w.jQuery('head').append('<style id="ubiquityCss" type="text/css">.ubiquityHighlight {border: 1px blue solid !important;}</style>');
w.jQuery("a").highlight(null, "ubiquityHighlight");
});
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment