Text is hidden when page is a JSON file

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
xtal256
Moon lover
Moon lover
Posts: 95
Joined: 2014-06-22, 00:32
Location: here

Text is hidden when page is a JSON file

Unread post by xtal256 » 2024-07-17, 01:41

When I go to a web page that is a plain JSON file (i.e. not HTML rendering JSON but the content is served as JSON), it just displays a blank page. When I look at the styles in dev tools I can see that there is an explicit CSS rule to hide it, for some reason.
The CSS is coming from resource://devtools/client/jsonview/css/general.css. Here is the contents of that file:
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

/******************************************************************************/
/* General */

body {
color: var(--theme-body-color);
background-color: var(--theme-body-background);
padding: 0;
margin: 0;
overflow-x: hidden;
}

*:focus {
outline: none !important;
}

#content {
height: 100%;
}

pre {
background-color: white;
border: none;
font-family: var(--monospace-font-family);
}

#json {
display: none;
white-space: pre-wrap;
}

/******************************************************************************/
/* Dark Theme */

body.theme-dark {
color: var(--theme-body-color);
background-color: var(--theme-body-background);
}

.theme-dark pre {
background-color: var(--theme-body-background);
}
At first I thought it was probably a problem with my own custom theme, but I cannot find any matching text in my theme files.
I then tried switching to the default theme and running in safe mode and the problem still happens.


Operating system: Windows 10
Browser version: 33.2.1
32-bit or 64-bit browser?: 32 bit
Problem URL: Any .json url
Browser theme (if not default): Happens with default theme
Installed add-ons: Happens in safe mode (i.e. add-ons disabled)

xtal256
Moon lover
Moon lover
Posts: 95
Joined: 2014-06-22, 00:32
Location: here

Re: Text is hidden when page is a JSON file

Unread post by xtal256 » 2024-07-17, 01:44

I also have the JSONovich add-in which works for .json files that are on my local computer (e.g. file:// protocol) but for some reason it does not work for json files on the web. Not sure if that's by design or a bug in that add-in. However, as mentioned above, the problem does not seem to be caused by any add-in.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5589
Joined: 2015-12-09, 15:45

Re: Text is hidden when page is a JSON file

Unread post by moonbat » 2024-07-17, 02:08

Could have to do with whether the server is sending the correct MIME header, ie application/json or similar.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 953
Joined: 2020-11-03, 06:47
Location: Philippines

Re: Text is hidden when page is a JSON file

Unread post by jobbautista9 » 2024-07-17, 02:50

Please include troubleshooting information from about:support. Devtools is supposed to be fired by default when navigating to a json file and display the json in a pretty manner, which is why the CSS exists.
Image

"Destroying things, smartly!" - IJN Samidare, probably

Avatar artwork by ebifurya: https://www.pixiv.net/artworks/85379109

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

xtal256
Moon lover
Moon lover
Posts: 95
Joined: 2014-06-22, 00:32
Location: here

Re: Text is hidden when page is a JSON file

Unread post by xtal256 » 2024-07-17, 04:36

@moonbat: The server is sending Content-Type:"application/json;charset=UTF-8" so no problem there.

@jobbautista9: You are saying that the devtools should open when browsing to a json file? Or that there is some code in devtools that is supposed to render the json pretty? In that case I don't believe there should be CSS to hide it, the code that runs to prettify it should handle hiding/removing the plain text. That way there is a nice fallback for if that doesn't work.

Anyway, as requested here is my troubleshooting information:
Application Basics
------------------

Name: Pale Moon
Version: 33.2.1 (32-bit)
Build ID: 20240710133309
Update Channel: release
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:102.0) Gecko/20100101 Goanna/6.6 Firefox/102.0 PaleMoon/33.2.1
OS: Windows_NT 10.0
CPU Capabilities: SSE2 AVX AVX2
Safe Mode: false

Extensions
----------

Name: Adblock Latitude
Version: 5.0.9
Enabled: true
ID: adblocklatitude@addons.palemoon.org

Name: Clear Search 2
Version: 1.1.2
Enabled: true
ID: ClearSearch2@extension-id.invalid

Name: DOM Inspector
Version: 3.1.7534
Enabled: true
ID: inspector@mozilla.org

Name: Download Manager (S3)
Version: 4.13
Enabled: true
ID: s3download@statusbar

Name: Forecastfox (fix version)
Version: 2.4.8
Enabled: true
ID: forecastfox@s3_fix_version

Name: ImageTweak
Version: 0.25.1.2
Enabled: true
ID: {DB2EA31C-58F5-48b7-8D60-CB0739257904}

Name: JSONovich
Version: 1.9.7.1.2
Enabled: true
ID: jsonovich@lackoftalent.org

Name: keyconfig
Version: 20110522
Enabled: true
ID: keyconfig@dorando

Name: LastPass
Version: 3.3.4
Enabled: true
ID: support@lastpass.com

Name: lori (Life-of-request info)
Version: 0.2.0.20080521.2
Enabled: true
ID: {6dfc4f52-26f0-4e5f-89c7-31d6de480db9}

Name: Markdown Viewer
Version: 1.12
Enabled: true
ID: markdownviewer@thiht.fr

Name: Menu Wizard
Version: 5.05
Enabled: true
ID: s3menu@wizard

Name: Organize Status Bar
Version: 0.6.5
Enabled: true
ID: {35106bca-6c78-48c7-ac28-56df30b51d2c}

Name: Pale Moon Commander
Version: 3.0.1
Enabled: true
ID: commander@palemoon.org

Name: Stylish
Version: 2.0.7
Enabled: true
ID: {46551EC9-40F0-4e47-8E18-8E5CF550CFB8}

Name: Tab Mix Plus
Version: 0.5.8.4
Enabled: true
ID: {dc572301-7619-498c-a57d-39143191b318}

Name: Tab Scope
Version: 1.6.1.2
Enabled: true
ID: tabscope@xuldev.org

Name: Windowify Manager Pages
Version: 2.0
Enabled: true
ID: {450aca1a-ca16-4ab6-82bd-188bdce72ef7}

Name: Greasemonkey
Version: 1.15
Enabled: false
ID: {e4a8a97b-f2ed-450b-b12d-ee082ba24781}

Name: Web Developer
Version: 1.2.11
Enabled: false
ID: {c45c406e-ab73-11d8-be73-000a95be3b12}

Graphics
--------

Features
Compositing: Direct3D 11
GPU Accelerated Windows: 1/1 Direct3D 11 (OMTC)
Asynchronous Pan/Zoom: none
WebGL 1 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 0000000000011e52) EGL_VERSION: 1.4 (ANGLE 2.1.0.) EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture_nv12 EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 1 Driver Renderer: Google Inc. -- ANGLE (Intel(R) UHD Graphics 630 Direct3D11 vs_5_0 ps_5_0)
WebGL 1 Driver Version: OpenGL ES 2.0 (ANGLE 2.1.0.)
WebGL 1 Driver Extensions: GL_OES_element_index_uint GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_OES_rgb8_rgba8 GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_NV_pixel_buffer_object GL_OES_mapbuffer GL_EXT_map_buffer_range GL_EXT_color_buffer_half_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_float GL_OES_texture_float_linear GL_EXT_texture_rg GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_OES_compressed_ETC1_RGB8_texture GL_EXT_sRGB GL_ANGLE_depth_texture GL_OES_depth32 GL_EXT_texture_storage GL_OES_texture_npot GL_EXT_draw_buffers GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_NV_fence GL_EXT_disjoint_timer_query GL_EXT_robustness GL_EXT_blend_minmax GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_pack_reverse_row_order GL_OES_standard_derivatives GL_EXT_shader_texture_lod GL_EXT_frag_depth GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_EXT_discard_framebuffer GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_NV_EGL_stream_consumer_external GL_EXT_unpack_subimage GL_NV_pack_subimage GL_OES_vertex_array_object GL_KHR_debug GL_ANGLE_lossy_etc_decode GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_sync_query GL_CHROMIUM_copy_texture
WebGL 1 Extensions: ANGLE_instanced_arrays EXT_blend_minmax EXT_color_buffer_half_float EXT_frag_depth EXT_shader_texture_lod EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug_get OES_element_index_uint OES_standard_derivatives OES_texture_float OES_texture_float_linear OES_texture_half_float OES_texture_half_float_linear OES_vertex_array_object WEBGL_color_buffer_float WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_depth_texture WEBGL_draw_buffers WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc MOZ_WEBGL_depth_texture
WebGL 2 Driver WSI Info: EGL_VENDOR: Google Inc. (adapter LUID: 0000000000011e52) EGL_VERSION: 1.4 (ANGLE 2.1.0.) EGL_EXTENSIONS: EGL_EXT_create_context_robustness EGL_ANGLE_d3d_share_handle_client_buffer EGL_ANGLE_surface_d3d_texture_2d_share_handle EGL_ANGLE_query_surface_pointer EGL_ANGLE_window_fixed_size EGL_ANGLE_keyed_mutex EGL_ANGLE_surface_orientation EGL_ANGLE_direct_composition EGL_NV_post_sub_buffer EGL_KHR_create_context EGL_EXT_device_query EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_get_all_proc_addresses EGL_KHR_stream EGL_KHR_stream_consumer_gltexture EGL_NV_stream_consumer_gltexture_yuv EGL_ANGLE_flexible_surface_compatibility EGL_ANGLE_stream_producer_d3d_texture_nv12 EGL_EXTENSIONS(nullptr): EGL_EXT_client_extensions EGL_EXT_platform_base EGL_EXT_platform_device EGL_ANGLE_platform_angle EGL_ANGLE_platform_angle_d3d EGL_ANGLE_device_creation EGL_ANGLE_device_creation_d3d11 EGL_ANGLE_experimental_present_path EGL_KHR_client_get_all_proc_addresses
WebGL 2 Driver Renderer: Google Inc. -- ANGLE (Intel(R) UHD Graphics 630 Direct3D11 vs_5_0 ps_5_0)
WebGL 2 Driver Version: OpenGL ES 3.0 (ANGLE 2.1.0.)
WebGL 2 Driver Extensions: GL_OES_element_index_uint GL_OES_packed_depth_stencil GL_OES_get_program_binary GL_OES_rgb8_rgba8 GL_EXT_texture_format_BGRA8888 GL_EXT_read_format_bgra GL_NV_pixel_buffer_object GL_OES_mapbuffer GL_EXT_map_buffer_range GL_EXT_color_buffer_half_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_texture_float GL_OES_texture_float_linear GL_EXT_texture_rg GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_OES_compressed_ETC1_RGB8_texture GL_EXT_sRGB GL_ANGLE_depth_texture GL_OES_depth32 GL_EXT_texture_storage GL_OES_texture_npot GL_EXT_draw_buffers GL_EXT_texture_filter_anisotropic GL_EXT_occlusion_query_boolean GL_NV_fence GL_EXT_disjoint_timer_query GL_EXT_robustness GL_EXT_blend_minmax GL_ANGLE_framebuffer_blit GL_ANGLE_framebuffer_multisample GL_ANGLE_instanced_arrays GL_ANGLE_pack_reverse_row_order GL_OES_standard_derivatives GL_EXT_shader_texture_lod GL_EXT_frag_depth GL_ANGLE_texture_usage GL_ANGLE_translated_shader_source GL_EXT_discard_framebuffer GL_EXT_debug_marker GL_OES_EGL_image GL_OES_EGL_image_external GL_OES_EGL_image_external_essl3 GL_NV_EGL_stream_consumer_external GL_EXT_unpack_subimage GL_NV_pack_subimage GL_EXT_color_buffer_float GL_OES_vertex_array_object GL_KHR_debug GL_ANGLE_lossy_etc_decode GL_CHROMIUM_bind_uniform_location GL_CHROMIUM_sync_query GL_CHROMIUM_copy_texture GL_EXT_texture_norm16
WebGL 2 Extensions: EXT_color_buffer_float EXT_texture_filter_anisotropic EXT_disjoint_timer_query MOZ_debug_get OES_texture_float_linear WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context MOZ_WEBGL_lose_context MOZ_WEBGL_compressed_texture_s3tc
Hardware H264 Decoding: Yes; Using D3D11 API
Audio Backend: wasapi
Direct2D: true
DirectWrite: true (10.0.19041.4355)
GPU #1
Active: Yes
Description: Intel(R) UHD Graphics 630
Vendor ID: 0x8086
Device ID: 0x3e92
Driver Version: 30.0.100.9864
Driver Date: 8-20-2021
Drivers: igdumdim64 igd10iumd64 igd10iumd64 igd12umd64 igdumdim32 igd10iumd32 igd10iumd32 igd12umd32
Subsys ID: 08711028
RAM: Unknown

Diagnostics
AzureCanvasAccelerated: 0
AzureCanvasBackend: direct2d 1.1
AzureContentBackend: direct2d 1.1
AzureFallbackCanvasBackend: cairo





Important Modified Preferences
------------------------------

accessibility.typeaheadfind: true
accessibility.typeaheadfind.flashBar: 0
browser.cache.compression_level: 1
browser.cache.disk.capacity: 204800
browser.cache.disk.filesystem_reported: 1
browser.cache.disk.smart_size_cached_value: 358400
browser.cache.disk.smart_size.enabled: false
browser.cache.disk.smart_size.first_run: false
browser.cache.disk.smart_size.use_old_max: false
browser.cache.memory.enable: false
browser.display.background_color: #C0C0C0
browser.display.use_system_colors: true
browser.download.importedFromSqlite: true
browser.download.manager.showAlertOnComplete: false
browser.download.manager.showWhenStarting: false
browser.fixup.alternate.enabled: false
browser.places.importBookmarksHTML: false
browser.places.importDefaults: false
browser.places.leftPaneFolderId: -1
browser.places.migratePostDataAnnotations: false
browser.places.smartBookmarksVersion: 4
browser.places.updateRecentTagsUri: false
browser.privatebrowsing.dont_prompt_on_enter: true
browser.search.openintab: true
browser.search.suggest.enabled: false
browser.search.update: false
browser.search.useDBForOrder: true
browser.sessionstore.restore_on_demand: false
browser.startup.homepage: https://www.google.com.au/webhp?complete=0&gws_rd=ssl
browser.startup.homepage_override.buildID: 20240710133309
browser.startup.homepage_override.mstone: 6.6.0
browser.tabs.agePerSeconds: 1
browser.tabs.agingAmount2: 5
browser.tabs.closeWindowWithLastTab: false
browser.tabs.highlightActiveTab: false
browser.tabs.selectOwnerOnClose: false
browser.tabs.warnOnClose: false
browser.urlbar.autoFill: false
browser.urlbar.formatting.enabled: false
browser.urlbar.matchBehavior: 2
browser.urlbar.maxRichResults: 7
dom.max_script_run_time: 0
dom.mozApps.used: true
extensions.lastAppVersion: 33.2.1
font.default.x-western: sans-serif
font.internaluseonly.changed: false
general.useragent.extra.microsoftdotnet: (.NET CLR 3.5.30729)
general.useragent.updates.lastupdated: 1721160715520
gfx.blacklist.suggested-driver-version: 257.21
gfx.crash-guard.d3d11layers.appVersion: 33.2.1
gfx.crash-guard.d3d11layers.deviceID: 0x3e92
gfx.crash-guard.d3d11layers.driverVersion: 30.0.100.9864
gfx.crash-guard.d3d11layers.feature-d2d: true
gfx.crash-guard.d3d11layers.feature-d3d11: true
gfx.crash-guard.status.d3d11layers: 2
gfx.crash-guard.status.d3d11video: 2
gfx.direct3d.last_used_feature_level_idx: 0
gfx.font_rendering.cleartype_params.force_gdi_classic_max_size: 7
gfx.font_rendering.cleartype.always_use_for_content: true
gfx.font_rendering.cleartype.use_for_downloadable_fonts: true
media.benchmark.vp9.fps: 302
media.benchmark.vp9.versioncheck: 3
media.gmp.storage.version.observed: 1
media.hardware-video-decoding.failed: false
network.automatic-ntlm-auth.trusted-uris: <redacted>,<redacted>
network.cookie.prefsMigrated: true
network.enableIDN: false
network.http.max-persistent-connections-per-server: 8
network.negotiate-auth.delegation-uris: <redacted>,<redacted>
network.negotiate-auth.trusted-uris: <redacted>,<redacted>
places.database.lastMaintenance: 1721022882
places.history.expiration.transient_current_max_pages: 128099
plugin.disable_full_page_plugin_for_types: application/vnd.fdf
plugin.importedState: true
plugin.state.flash: 0
plugin.state.java: 0
plugin.state.np-vmware-vmrc: 0
plugin.state.npadobeaamdetect: 0
plugin.state.npauthz: 0
plugin.state.npctrl: 0
plugin.state.npdeployjava: 0
plugin.state.npfoxitreaderplugin: 0
plugin.state.npgoogleupdate: 0
plugin.state.npican: 0
plugin.state.npintelwebapiipt: 0
plugin.state.npintelwebapiupdater: 0
plugin.state.npmeetingjoinpluginoc: 0
plugin.state.npnv3dv: 0
plugin.state.npnv3dvstreaming: 0
plugin.state.npspwrap: 0
plugin.state.npurlinterceptorplugin: 0
privacy.clearOnShutdown.cookies: false
privacy.clearOnShutdown.downloads: false
privacy.clearOnShutdown.formdata: false
privacy.clearOnShutdown.history: false
privacy.clearOnShutdown.offlineApps: true
privacy.clearOnShutdown.sessions: false
privacy.cpd.cookies: false
privacy.cpd.downloads: false
privacy.cpd.extensions-tabmix: false
privacy.cpd.formdata: false
privacy.cpd.history: false
privacy.cpd.offlineApps: true
privacy.cpd.sessions: false
privacy.donottrackheader.value: 1
privacy.GPCheader.enabled: true
privacy.sanitize.migrateFx3Prefs: true
privacy.sanitize.timeSpan: 0
security.dialog_enable_delay: 0
security.disable_button.openCertManager: false
security.disable_button.openDeviceManager: false
security.OCSP.disable_button.managecrl: false
security.tls.version.min: 2
security.warn_viewing_mixed: false
services.sync.declinedEngines:
services.sync.engine.greasemonkey: false
storage.vacuum.last.index: 1
storage.vacuum.last.places.sqlite: 1720244351
ui.osk.debug.keyboardDisplayReason: IKPOS: Touch screen not found.

Important Locked Preferences
----------------------------

Places Database
---------------

JavaScript
----------

Incremental GC: true

Accessibility
-------------

Activated: false
Prevent Accessibility: 1

Library Versions
----------------

NSPR
Expected minimum version: 4.35
Version in use: 4.35

NSS
Expected minimum version: 3.90.3
Version in use: 3.90.3

NSSSMIME
Expected minimum version: 3.90.3
Version in use: 3.90.3

NSSSSL
Expected minimum version: 3.90.3
Version in use: 3.90.3

NSSUTIL
Expected minimum version: 3.90.3
Version in use: 3.90.3

xtal256
Moon lover
Moon lover
Posts: 95
Joined: 2014-06-22, 00:32
Location: here

Re: Text is hidden when page is a JSON file

Unread post by xtal256 » 2024-07-17, 04:41

Hmm, maybe it does have something to do with the content-type. When I go to https://httpbin.org/get it works as expected. It's content type is just ""application/json" (no charset).

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37658
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Text is hidden when page is a JSON file

Unread post by Moonchild » 2024-07-17, 05:56

Your addon might conflict with the internal json viewer, both wanting to style/present json content. You can disable the latter with the preference devtools.jsonview.enabled
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 953
Joined: 2020-11-03, 06:47
Location: Philippines

Re: Text is hidden when page is a JSON file

Unread post by jobbautista9 » 2024-07-17, 06:55

xtal256 wrote:
2024-07-17, 04:36
You are saying that the devtools should open when browsing to a json file? Or that there is some code in devtools that is supposed to render the json pretty?
The internal json viewer is a part of devtools itself, it's just that it opens to the main viewport of the browser instead of its own.

But yeah you can try toggling the about:config pref Moonchild mentioned, it should always show the JSON as plaintext when disabled.
Image

"Destroying things, smartly!" - IJN Samidare, probably

Avatar artwork by ebifurya: https://www.pixiv.net/artworks/85379109

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

xtal256
Moon lover
Moon lover
Posts: 95
Joined: 2014-06-22, 00:32
Location: here

Re: Text is hidden when page is a JSON file

Unread post by xtal256 » 2024-07-22, 00:53

I uninstalled JSONovich now that I know there is a built-in JSON viewer (I actually already had it disabled on one machine) yet the issue persists.

I set devtools.jsonview.enabled to false and I can see the text, so it definitely is a problem with that jsonview tool.
By the way, is that jsonview this thing? Or is that a separate add-in? Because I remember using that a long time ago and my extensions.enabledItems pref contains jsonview@brh.numbera.com, yet it does not appear in the list of extensions in the GUI.

Even if an add-in is conflicting, the CSS to hide the text is in the original source code. Can that line at least be removed so that the text will show even if the JSON viewer does not load properly?

User avatar
RealityRipple
Keeps coming back
Keeps coming back
Posts: 861
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

Re: Text is hidden when page is a JSON file

Unread post by RealityRipple » 2024-07-22, 01:09

There is no item with the ID "json" in the built-in JSON viewer.

xtal256
Moon lover
Moon lover
Posts: 95
Joined: 2014-06-22, 00:32
Location: here

Re: Text is hidden when page is a JSON file

Unread post by xtal256 » 2024-07-22, 03:41

RealityRipple wrote:
2024-07-22, 01:09
There is no item with the ID "json" in the built-in JSON viewer.
There's not? This is the HTML I see when I open a JSON file:

Code: Select all

<html platform="win" class="theme-light" dir="ltr">
    <head>
        <base href="resource://devtools/client/jsonview/">
        <link rel="stylesheet" type="text/css" href="css/main.css">
        <script src="lib/require.js" data-main="viewer-config" defer=""></script>
    </head>
    <body>
        <div id="content">
            <plaintext id="json">
                ###  Actual JSON contents here  ###
            </plaintext>
        </div>
    </body>
</html>
It's that <plaintext> element that's getting hidden by the CSS rule.

Oh right but the json viewer is not loading, so I guess this is like a fallback page or something.

User avatar
RealityRipple
Keeps coming back
Keeps coming back
Posts: 861
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

Re: Text is hidden when page is a JSON file

Unread post by RealityRipple » 2024-07-22, 05:09

I believe that's the scaffold upon which the JSON viewer is built. Created by /devtools/client/jsonview/converter-child.js around line 200. You don't have anything like NoScript installed, do you?

User avatar
jobbautista9
Keeps coming back
Keeps coming back
Posts: 953
Joined: 2020-11-03, 06:47
Location: Philippines

Re: Text is hidden when page is a JSON file

Unread post by jobbautista9 » 2024-07-22, 10:02

RealityRipple wrote:
2024-07-22, 05:09
You don't have anything like NoScript installed, do you?
OP included troubleshooting info earlier which doesn't include NoScript in the list of add-ons, so probably not.
Image

"Destroying things, smartly!" - IJN Samidare, probably

Avatar artwork by ebifurya: https://www.pixiv.net/artworks/85379109

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

User avatar
RealityRipple
Keeps coming back
Keeps coming back
Posts: 861
Joined: 2018-05-17, 02:34
Location: Los Berros Canyon, California

Re: Text is hidden when page is a JSON file

Unread post by RealityRipple » 2024-08-16, 03:59

Now running into the same problem with a custom AVX2 build. However, creating a new blank profile (palemoon -P) yielded a successful render. Seeing if I can narrow it down.

Edit: ScriptBlock was the culprit for me.