Skip to content

Instantly share code, notes, and snippets.

Yury Delendik yurydelendik

Block or report user

Report or block yurydelendik

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
#container {
background-color: red;
position: relative;
width: 100%;
@yurydelendik
yurydelendik / gist:2579279
Created May 2, 2012 — forked from brendandahl/gist:2579276
Change Channel Owner
View gist:2579279
// Keep the URL the same so the browser sees it as the same.
channel.originalURI = aRequest.URI;
channel.asyncOpen(proxy, aContext);
var securityManager = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager);
log('got secruity manager!');
var uri = ioService.newURI('resource://pdf.js/web/viewer.html', null, null);
var principal = securityManager.getCodebasePrincipal(uri);
log('created principal!');
channel.owner = principal;
log('hey we changed the owner!');
You can’t perform that action at this time.