Closed
Bug 1282105
Opened 8 years ago
Closed 7 years ago
NoScript extension blocks display of JSON data
Categories
(DevTools :: JSON Viewer, defect, P4)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: whimboo, Unassigned)
Details
I have NoScript 2.9.0.11 installed and whenever I open a URL which returns JSON data the page is displayed as white. Once NoScript gets disabled the json viewer works correctly. I'm not exactly sure what exactly is causing this misbehavior. If its NoScript or the internal json viewer.
Reporter | ||
Comment 2•8 years ago
|
||
Sorry that I missed to add an example for it. Here you have one: https://treeherder.mozilla.org/api/project/mozilla-central/jobs/?exclusion_profile=False&format=json&machine_platform_os=mac&option_collection_hash=102210fe594ee9b33d82058545b1ed14f4c8206e&result_set_id=5319
Flags: needinfo?(hskupin)
Comment 3•8 years ago
|
||
(In reply to Henrik Skupin (:whimboo) from comment #0) > I have NoScript 2.9.0.11 installed and whenever I open a URL which returns > JSON data the page is displayed as white. Once NoScript gets disabled the > json viewer works correctly. JSON Viewer is using JavaScript to render the page so, blocking JS breaks it. There is no plan currently that would allow running JSON Viewer without JS. Honza
Priority: -- → P4
Comment 4•8 years ago
|
||
I'm gonna work around by checking whether the content type changed from JSON to text/html just before blocking scripts, like this: <snippet> let channel = docShell.currentDocumentChannel; if (channel instanceof Ci.nsIHttpChannel) { let originalContentType = channel.getResponseHeader("Content-Type"); if (/\/json(?:;|^)/i.test(originalContentType) && channel.contentType === "text/html") { blockJS = false; } } </snippet> Of course I'd really prefer something less hackish and working also on non-HTTP channels, e.g. you might set some flag / property on the channel in your jsonview-converter at https://dxr.mozilla.org/mozilla-central/rev/4c05938a64a7fde3ac2d7f4493aee1c5f2ad8a0a/devtools/client/jsonview/converter-child.js#98
Comment 5•7 years ago
|
||
After bug 1366239 you should at least see the raw JSON.
Comment 6•7 years ago
|
||
NoScript fixed this in version 5.0.4 https://addons.mozilla.org/firefox/addon/noscript/versions/5.0.4 > Fixed JSON viewer working only on JavaScript-enabled URLs
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•