Skip to content

Instantly share code, notes, and snippets.

@jmatsu
Last active August 29, 2015 14:21
Show Gist options
  • Save jmatsu/e5800eda726722decbda to your computer and use it in GitHub Desktop.
Save jmatsu/e5800eda726722decbda to your computer and use it in GitHub Desktop.
For running a optional javascript on the javascript console of Google Chrome.
alert('Hey! I am test alert!');
// This is a sample. jQuery will work fine on your console.
(script = document.createElement('script')).src = 'http://code.jquery.com/jquery-latest.min.js';
document.getElementsByTagName('head')[0].appendChild(script);
// Optional javascript works on your console too.
// Please modify next line to fit your infomation.
var username="jmatsu"; var gist_id="e5800eda726722decbda"; var filename="default_optional_mine.js";
(script2 = document.createElement('script')).src = 'https://rawgithub.com/'+username+'/'+gist_id+'/raw/'+filename;
document.getElementsByTagName('head')[0].appendChild(script2);
// Please remove caches and reload your browser if no change reflect.
// gist.github.com cannot run js file which is via gist because it violates the following Content Security Policy directive.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment