Open Crul opened 2 years ago
Are you using the latest git version? I'm unable to replicate the issue on my end with the latest git version. Though you're right that it doesn't handle undefined
in that section of the code, that's for posts (I'm not sure if it needs to handle it or not?). For images (like the one you shared), it handles undefined
:
var json = match[1].replace(/(\"\s*:)\s*(?:\/.*?\/|undefined|new RegExp\(.*?\))\s*([,}])/g, "$1null$2");
@qsniyg Indeed, I cannot replicate it in the same way, but it still doesn't work.
Now it says No media info
(on check_image_get
) because obj[0]
is this object with no media_info
property:
{ waiting: true, url: "https://64.media.tumblr.com/9e9d07664bd68d9fc36c5aeaf3d9b83d…4d3-8e/s500x750/12c05728ddf181dc39caa05a51a02fbeeb9d38d7.jpg" }
I don't know if that's correct; because I can access a larger verion if I change s500x750
with `s999999999x999999999:
https://64.media.tumblr.com/9e9d07664bd68d9fc36c5aeaf3d9b83d/cd60a7e1e46554d3-8e/s999999999x999999999/d241330421e102771fa470084f2e355f1c738be2.jpg
... but I have no idea what I'm talking about, so feel free to close this issue if you think it's working as expected.
Thanks.
Can you send your settings? (through the Export button at the top)
Sure, here you have it (bottom). I should also point out that I have some (40, full list below) addons installed. I tried to make sure they are not interfering with this issue. Info no my previous comment was gathered after disabling uMatix, uBlock Origin, TamperMonkey and Request Control. But I may have missed something... sorry if that's the case.
Again, feel free to clsoe the issue if you cannot replicate it, because in that case I think it's most probably my fault. Thanks.
Zhongwen: Chinese-English Dictionary
{ "imu_enabled": true, "language": "en", "check_updates": true, "check_update_interval": 72, "check_update_notify": true, "dark_mode": false, "settings_tabs": true, "settings_alphabetical_order": false, "settings_visible_description": true, "settings_show_disabled": true, "settings_show_disabled_profiles": false, "settings_show_requirements": true, "advanced_options": false, "allow_browser_request": true, "retry_503_times": 3, "retry_503_ms": 2000, "use_blob_over_arraybuffer": false, "allow_live_settings_reload": true, "allow_remote": true, "disable_keybind_when_editing": true, "enable_gm_download": true, "gm_download_max": 15, "enable_webextension_download": false, "write_to_clipboard": false, "redirect": false, "redirect_video": true, "redirect_audio": false, "redirect_history": true, "redirect_extension": true, "canhead_get": true, "redirect_force_page": false, "redirect_enable_infobox": true, "redirect_infobox_url": false, "redirect_infobox_timeout": 7, "print_imu_obj": false, "redirect_disable_for_responseheader": false, "redirect_to_no_infobox": false, "redirect_host_html": false, "mouseover": true, "mouseover_open_behavior": "popup", "t2_mouseover_open_behavior": "popup", "t3_mouseover_open_behavior": "popup", "mouseover_trigger_behavior": [ "none" ], "mouseover_trigger_key": [ "shift", "alt", "i" ], "mouseover_trigger_key_t2": [], "mouseover_trigger_key_t3": [], "mouseover_trigger_delay": 1, "mouseover_trigger_mouseover": false, "mouseover_trigger_enabledisable_toggle": "disable", "mouseover_trigger_prevent_key": [ "shift" ], "mouseover_close_behavior": "esc", "mouseover_close_need_mouseout": true, "mouseover_jitter_threshold": 30, "mouseover_cancel_popup_when_elout": true, "mouseover_cancel_popup_with_esc": true, "mouseover_cancel_popup_when_release": true, "mouseover_auto_close_popup": false, "mouseover_auto_close_popup_time": 5, "mouseover_hold_key": [ "i" ], "mouseover_hold_position_center": false, "popup_hold_zoom": "none", "mouseover_hold_close_unhold": false, "mouseover_hold_unclickthrough": true, "mouseover_close_el_policy": "both", "mouseover_close_click_outside": false, "mouseover_allow_partial": "media", "mouseover_partial_avoid_head": false, "mouseover_use_blob_over_data": false, "popup_use_anonymous_crossorigin": false, "mouseover_enable_notallowed": true, "mouseover_enable_notallowed_cant_load": true, "mouseover_notallowed_duration": 300, "mouseover_minimum_size": 20, "popup_maximum_source_size": 0, "mouseover_exclude_backgroundimages": false, "mouseover_exclude_page_bg": true, "mouseover_exclude_imagemaps": true, "mouseover_only_links": false, "mouseover_linked_image": false, "mouseover_exclude_sameimage": false, "mouseover_exclude_imagetab": true, "mouseover_allow_video": true, "t2_mouseover_allow_video": true, "t3_mouseover_allow_video": true, "mouseover_allow_audio": false, "t2_mouseover_allow_audio": false, "t3_mouseover_allow_audio": false, "mouseover_allow_hlsdash": true, "t2_mouseover_allow_hlsdash": true, "t3_mouseover_allow_hlsdash": true, "enable_stream_download": false, "stream_mux_mp4_over_mkv": false, "hls_dash_use_max": true, "max_video_quality": null, "mouseover_video_autoplay": true, "mouseover_video_controls": false, "mouseover_video_controls_key": [ "c" ], "mouseover_video_loop": true, "mouseover_video_autoloop_max": 0, "mouseover_video_playpause_key": [ "space" ], "mouseover_video_muted": false, "mouseover_video_mute_key": [ "m" ], "mouseover_video_volume": 100, "mouseover_video_volume_down_key": [ "9" ], "mouseover_video_volume_up_key": [ "0" ], "mouseover_video_volume_change_amt": 5, "mouseover_video_resume_from_source": false, "mouseover_video_resume_if_different": false, "mouseover_video_pause_source": true, "mouseover_video_seek_amount": 10, "mouseover_video_seek_left_key": [ "shift", "left" ], "mouseover_video_seek_right_key": [ "shift", "right" ], "mouseover_video_frame_prev_key": [ "," ], "mouseover_video_frame_next_key": [ "." ], "mouseover_video_framerate": 25, "mouseover_video_speed_down_key": [ "[" ], "mouseover_video_speed_up_key": [ "]" ], "mouseover_video_speed_amount": 0.25, "mouseover_video_reset_speed_key": [ "backspace" ], "mouseover_video_screenshot_key": [ "shift", "s" ], "popup_video_screenshot_format": "png", "mouseover_ui": true, "mouseover_ui_toggle_key": [ "u" ], "mouseover_ui_opacity": 80, "mouseover_ui_use_safe_glyphs": false, "mouseover_ui_imagesize": true, "mouseover_ui_zoomlevel": true, "mouseover_ui_filesize": false, "mouseover_ui_gallerycounter": true, "mouseover_ui_gallerymax": 50, "mouseover_ui_gallerybtns": true, "mouseover_ui_closebtn": true, "mouseover_ui_optionsbtn": false, "mouseover_ui_downloadbtn": false, "mouseover_ui_rotationbtns": false, "mouseover_ui_caption": true, "mouseover_ui_wrap_caption": true, "mouseover_ui_caption_link_page": true, "mouseover_ui_link_underline": true, "mouseover_use_remote": false, "mouseover_zoom_behavior": "fit", "mouseover_zoom_custom_percent": 100, "mouseover_zoom_use_last": "gallery", "mouseover_zoom_max_width": 0, "mouseover_zoom_max_height": 0, "mouseover_pan_behavior": "drag", "mouseover_movement_inverted": true, "mouseover_drag_min": 5, "mouseover_scrolly_behavior": "zoom", "mouseover_scrolly_hold_behavior": "default", "mouseover_scrollx_behavior": "gallery", "mouseover_scrollx_hold_behavior": "default", "mouseover_scrolly_video_behavior": "default", "mouseover_scrolly_video_invert": false, "mouseover_scrollx_video_behavior": "default", "scroll_override_page": false, "scroll_zoom_origin": "cursor", "scroll_zoomout_pagemiddle": "never", "scroll_zoom_behavior": "fitfull", "scroll_incremental_mult": 1.25, "mouseover_move_with_cursor": false, "mouseover_move_within_page": true, "zoom_out_to_close": false, "scroll_past_gallery_end_to_close": false, "mouseover_position": "cursor", "mouseover_prevent_cursor_overlap": true, "mouseover_overflow_position_center": false, "mouseover_overflow_origin": "a11", "mouseover_add_link": true, "mouseover_add_video_link": false, "mouseover_click_image_close": false, "mouseover_click_video_close": false, "mouseover_download": false, "mouseover_hide_cursor": false, "mouseover_hide_cursor_after": 0, "mouseover_mouse_inactivity_jitter": 5, "mouseover_clickthrough": false, "mouseover_mask_ignore_clicks": false, "mouseover_links": true, "mouseover_only_valid_links": true, "mouseover_allow_self_pagelink": false, "mouseover_allow_iframe_el": false, "mouseover_allow_canvas_el": false, "mouseover_allow_svg_el": false, "mouseover_enable_gallery": true, "mouseover_gallery_cycle": false, "mouseover_gallery_prev_key": [ "left" ], "mouseover_gallery_next_key": [ "right" ], "mouseover_gallery_move_after_video": false, "mouseover_gallery_download_key": [ "shift", "d" ], "gallery_download_method": "zip", "gallery_download_unchanged": true, "gallery_zip_filename_format": "{host_domain_nosub}-{items_amt}-{download_unix}\n{items_amt}-{download_unix}", "gallery_jd_autostart": false, "gallery_jd_referer": "domain", "gallery_zip_add_tld": true, "gallery_zip_add_info_file": true, "mouseover_styles": "", "mouseover_enable_fade": true, "mouseover_enable_zoom_effect": false, "mouseover_zoom_effect_move": false, "mouseover_fade_time": 100, "mouseover_enable_mask_styles2": "never", "mouseover_mask_styles2": "background-color: rgba(0, 0, 0, 0.5)", "mouseover_mask_fade_time": 100, "mouseover_ui_styles": "", "mouseover_wait_use_el": false, "mouseover_add_to_history": false, "mouseover_close_key": [ "esc" ], "mouseover_download_key": [ [ "s" ], [ "ctrl", "s" ] ], "mouseover_open_new_tab_key": [ "o" ], "mouseover_open_bg_tab_key": [ "shift", "o" ], "mouseover_copy_link_key": [ "shift", "c" ], "mouseover_open_options_key": [ "p" ], "mouseover_open_orig_page_key": [ "n" ], "mouseover_rotate_left_key": [ "e" ], "mouseover_rotate_right_key": [ "r" ], "mouseover_flip_horizontal_key": [ "h" ], "mouseover_flip_vertical_key": [ "v" ], "mouseover_zoom_in_key": [ [ "+" ], [ "=" ], [ "shift", "=" ] ], "mouseover_zoom_out_key": [ [ "-" ] ], "mouseover_zoom_full_key": [ "1" ], "mouseover_zoom_fit_key": [ "2" ], "mouseover_fullscreen_key": [ "f" ], "mouseover_apply_blacklist": true, "apply_blacklist_host": false, "mouseover_matching_media_types": false, "mouseover_allow_popup_when_fullscreen": false, "mouseover_find_els_mode": "hybrid", "popup_allow_cache": true, "popup_cache_duration": 30, "popup_cache_itemlimit": 20, "popup_cache_resume_video": true, "website_inject_imu": true, "website_image": true, "extension_contextmenu": true, "extension_hotreload": true, "allow_watermark": false, "allow_smaller": false, "allow_possibly_different": false, "allow_possibly_broken": false, "allow_possibly_upscaled": true, "allow_thirdparty": false, "allow_apicalls": true, "allow_thirdparty_libs": true, "custom_xhr_for_lib": true, "use_webarchive_for_lib": false, "lib_integrity_check": true, "allow_thirdparty_code": false, "allow_bruteforce": true, "process_format": {}, "deviantart_prefer_size": false, "deviantart_support_download": true, "ehentai_full_image": true, "imgur_filename": false, "imgur_source": false, "instagram_use_app_api": false, "instagram_dont_use_web": false, "instagram_prefer_video_quality": true, "instagram_gallery_postlink": false, "snapchat_orig_media": true, "tiktok_no_watermarks": false, "tiktok_thirdparty": null, "tumblr_api_key": "xrMpLM8n1eCeL3oRYSZG7CLALw6EHhYDdU6Wq5eD1PbMkld7Y1", "twitter_use_ext": false, "bigimage_blacklist": "", "bigimage_blacklist_engine": "glob", "filename_format": "{author_username} {filename}", "filename_replace_special_underscores": true, "replaceimgs_enable_keybinding": false, "replaceimgs_keybinding": [ "shift", "alt", "r" ], "replaceimgs_auto": false, "replaceimgs_replaceimgs": true, "replaceimgs_addlinks": false, "replaceimgs_replacelinks": false, "replaceimgs_plainlinks": "none", "replaceimgs_links_newtab": false, "replaceimgs_size_constraints": "none", "replaceimgs_usedata": false, "replaceimgs_wait_fullyloaded": true, "replaceimgs_totallimit": 8, "replaceimgs_domainlimit": 2, "replaceimgs_delay": 0, "replaceimgs_css": "", "replaceimgs_simple_progress": true, "highlightimgs_enable_keybinding": false, "highlightimgs_keybinding": [ "shift", "alt", "h" ], "highlightimgs_enable": false, "highlightimgs_auto": "never", "highlightimgs_onlysupported": true, "highlightimgs_css": "outline: 4px solid yellow", "last_update_check": 1666639021634, "last_update_version": "0.19.5", "last_update_url": null, "settings_version": 11 }
Affects: Firefox Addon v0.19.5
Steps to reproduce
Pointing to the this code:
The problem is that
json
does not contain a valid JSON string (full value below) because it includesundefined
values (not supported) and a property with anew RegExp(...)
object. If you changevar parsed = JSON_parse(json);
withvar parsed = eval(json);
, it works, but I'm not sure that's a safe way to do it.Thanks!