{"action":"created","issue":{"url":"https://api.github.com/repos/StylishThemes/GitHub-Dark/issues/188","repository_url":"https://api.github.com/repos/StylishThemes/GitHub-Dark","labels_url":"https://api.github.com/repos/StylishThemes/GitHub-Dark/issues/188/labels{/name}","comments_url":"https://api.github.com/repos/StylishThemes/GitHub-Dark/issues/188/comments","events_url":"https://api.github.com/repos/StylishThemes/GitHub-Dark/issues/188/events","html_url":"https://github.com/StylishThemes/GitHub-Dark/issues/188","id":45929919,"number":188,"title":"CSP solution","user":{"login":"leoj3n","id":990216,"avatar_url":"https://avatars.githubusercontent.com/u/990216?v=3","gravatar_id":"","url":"https://api.github.com/users/leoj3n","html_url":"https://github.com/leoj3n","followers_url":"https://api.github.com/users/leoj3n/followers","following_url":"https://api.github.com/users/leoj3n/following{/other_user}","gists_url":"https://api.github.com/users/leoj3n/gists{/gist_id}","starred_url":"https://api.github.com/users/leoj3n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leoj3n/subscriptions","organizations_url":"https://api.github.com/users/leoj3n/orgs","repos_url":"https://api.github.com/users/leoj3n/repos","events_url":"https://api.github.com/users/leoj3n/events{/privacy}","received_events_url":"https://api.github.com/users/leoj3n/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-10-15T22:56:12Z","updated_at":"2016-03-01T01:39:11Z","closed_at":"2014-11-19T20:19:31Z","body":"Regarding https://github.com/StylishThemes/GitHub-Dark/wiki/Image, my solution for now is to put the following code in `background.js` of a Chrome Extension:\r\n\r\n~~~js\r\n//\r\n// Disable CSP on GitHub\r\n//\r\n\r\nchrome.webRequest.onHeadersReceived.addListener(function(details) {\r\n    for (var i = 0; i < details.responseHeaders.length; i++) {\r\n        if (details.responseHeaders[i].name.toUpperCase() === 'CONTENT-SECURITY-POLICY') {\r\n            var begin = details.responseHeaders[i].value.split('img-src', 2);\r\n            var end = begin[1].split(';', 2);\r\n            details.responseHeaders[i].value = begin[0] + 'img-src \\'self\\' data: *;' + end[1];\r\n\r\n            console.log('New CSP should be... ' + details.responseHeaders[i].value);\r\n        }\r\n    }\r\n    return {\r\n        responseHeaders: details.responseHeaders\r\n    };\r\n}, {\r\n    urls: [ '*://*.github.com/*' ],\r\n    types: [ 'main_frame', 'sub_frame', 'stylesheet', 'script', 'image', 'object', 'xmlhttprequest', 'other' ]\r\n}, [ 'blocking', 'responseHeaders' ]);\r\n\r\nconsole.log('background.js Event Page');\r\n~~~\r\n\r\nAnd in `manifest.json`:\r\n\r\n~~~json\r\n{\r\n    \"permissions\": [\r\n        \"webRequest\",\r\n        \"webRequestBlocking\"\r\n    ]\r\n}\r\n~~~\r\n\r\n:smiling_imp: "},"comment":{"url":"https://api.github.com/repos/StylishThemes/GitHub-Dark/issues/comments/190485345","html_url":"https://github.com/StylishThemes/GitHub-Dark/issues/188#issuecomment-190485345","issue_url":"https://api.github.com/repos/StylishThemes/GitHub-Dark/issues/188","id":190485345,"user":{"login":"Mottie","id":136959,"avatar_url":"https://avatars.githubusercontent.com/u/136959?v=3","gravatar_id":"","url":"https://api.github.com/users/Mottie","html_url":"https://github.com/Mottie","followers_url":"https://api.github.com/users/Mottie/followers","following_url":"https://api.github.com/users/Mottie/following{/other_user}","gists_url":"https://api.github.com/users/Mottie/gists{/gist_id}","starred_url":"https://api.github.com/users/Mottie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mottie/subscriptions","organizations_url":"https://api.github.com/users/Mottie/orgs","repos_url":"https://api.github.com/users/Mottie/repos","events_url":"https://api.github.com/users/Mottie/events{/privacy}","received_events_url":"https://api.github.com/users/Mottie/received_events","type":"User","site_admin":false},"created_at":"2016-03-01T01:39:11Z","updated_at":"2016-03-01T01:39:11Z","body":"This is odd, I can add an external image in comments, but not as a background image?\r\n\r\n![safe?](http://i1134.photobucket.com/albums/m612/Jesseforever69/Funny%20Things/IZZSAFEIZZZZNOOTTT_3650d0_4347705.gif) &larr; from Photobucket\r\n\r\n![stplr](http://farm3.staticflickr.com/2214/2087834469_ddccc5f427_m.jpg) &larr; Flickr\r\n\r\n"}}