Skip to content

Commit db2c379

Browse files
committed
Remove dead CSP code
1 parent 8bdadb2 commit db2c379

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

app/scripts/background.js

-24
Original file line numberDiff line numberDiff line change
@@ -67,27 +67,3 @@ chrome.tabs.getSelected( null, function( tab ) {
6767
}
6868
});
6969

70-
//
71-
// Disable CSP on GitHub
72-
//
73-
74-
/* jk: causing problems in 2016
75-
chrome.webRequest.onHeadersReceived.addListener(function(details) {
76-
for (var i = 0; i < details.responseHeaders.length; i++) {
77-
if (details.responseHeaders[i].name.toUpperCase() === 'CONTENT-SECURITY-POLICY') {
78-
var begin = details.responseHeaders[i].value.split('img-src', 2);
79-
if (typeof begin[1] !== 'undefined') {
80-
var end = begin[1].split(';', 2);
81-
details.responseHeaders[i].value = begin[0] + 'img-src \'self\' data: *;' + end[1];
82-
}
83-
}
84-
}
85-
return {
86-
responseHeaders: details.responseHeaders
87-
};
88-
}, {
89-
urls: [ '*://*.github.com/*' ],
90-
types: [ 'main_frame', 'sub_frame', 'stylesheet', 'script', 'image', 'object', 'xmlhttprequest', 'other' ]
91-
}, [ 'blocking', 'responseHeaders' ]);
92-
*/
93-

0 commit comments

Comments
 (0)