Skip to content

Instantly share code, notes, and snippets.

@fearphage
Last active December 11, 2015 06:29
Show Gist options
  • Save fearphage/4559928 to your computer and use it in GitHub Desktop.
Save fearphage/4559928 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @include https://*.campfirenow.com/*
// ==/UserScript==
(function() {
opera.postError('in here now');
if (!document.hasFocus) {
document.hasFocus = function() {
return !document.hidden;
};
}
opera.addEventListener('BeforeScript'
, function(e) {
var name = e.element.src;
if (name && name.indexOf('sprockets.js') > -1) {
e.element.text = e.element.text.replace(
'return element.getAttribute(attribute);'
,'return element.getAttribute(name);'
);
}
}
,false
);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment