Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am agillette on github.
  • I am andygillette (https://keybase.io/andygillette) on keybase.
  • I have a public key ASD21EFoU0gA-fvoB4dtpAqlIwqwmH7Dmrw8ti-aMveYxgo

To claim this, I am signing this object:

@agillette
agillette / bg.js
Created March 19, 2014 14:34
Chrome extension JS and partial view and controller files for Vidlocket in-browser uploader
chrome.browserAction.onClicked.addListener(function(tab) {
// Helper function for URL parameter
window.location.getParam = function(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
result = regex.exec(parent.window.location.search);
if (result == null) {