qsniyg / maxurl

Finds larger/original versions of images and videos
https://qsniyg.github.io/maxurl/
Apache License 2.0
1.12k stars 69 forks source link

Feature requests regarding the behaviour of your script #556

Closed Hlsgs closed 3 years ago

Hlsgs commented 3 years ago

Hello!

I would like to make the following suggestions:

  1. "New background tab" Popup action, beside the normal "New tab"
  2. A keyboard shortcut to open the popup when "Popup action" is set to "New tab" or "Download"

Awesome work on this, btw. Thank you!

qsniyg commented 3 years ago

Thanks for the ideas!

For "new background tab", I've implemented it in https://github.com/qsniyg/maxurl/commit/ee30a23ed36c05100d88e82a430e7c7e4c624cd4. For the second though, this might be a bit more complex, as listed in #558. It's something I'd definitely like to do (and has been, in various ways, by far the most requested feature), but there's a fairly significant amount of work required to do it, and I haven't yet figured out the right way to do it.

If it's alright with you, I'll close this issue, as I think #558 should be better for tracking the second feature suggestion.

Hlsgs commented 3 years ago

Thanks for the ideas!

For "new background tab", I've implemented it in ee30a23.

Great, thank you! Looking forward to testing this when it gets pushed to GF.

For the second though, this might be a bit more complex, as listed in #558. It's something I'd definitely like to do (and has been, in various ways, by far the most requested feature), but there's a fairly significant amount of work required to do it, and I haven't yet figured out the right way to do it.

If it's alright with you, I'll close this issue, as I think #558 should be better for tracking the second feature suggestion.

558 sounds complex. Just to make sure that I got my point across, what I want is to have "open in backgound tab" as the default action for the main script kb trigger key and be able to use a different kb shortcut when I wish to open the popup instead.

qsniyg commented 3 years ago

Yeah I understand, and I agree, #558 is rather complex. I'm still trying to work out what'd be the easiest way to do it would be. Perhaps it would indeed be easiest just to have a fixed set of popup triggers, and replicate a few fixed options (such as Popup Action) for them...

I'll try to figure something out :)

qsniyg commented 3 years ago

Alright, I gave it some more thought, and I figured out a relatively easy solution that should work for the moment. The idea is, as I described above, fixed triggers and fixed options. In this case, the only modifiable option (for the moment) is Popup Action.

In order to use it, just add a new keybinding to Popup trigger key (#2), and set Popup Action (#2) accordingly.

Hlsgs commented 3 years ago

In order to use it, just add a new keybinding to Popup trigger key (#2), and set Popup Action (#2) accordingly.

Excellent! That would be exactly what I was looking for, but, now that I think about it more, perhaps each of all 4 possible Popup Actions should get it's own configurable trigger key. Or am I getting back into #558 territory? :)

qsniyg commented 3 years ago

@Hlsgs I don't mind adding that if there's a use case (it's not hard at all to do), but my reservation in adding too many shortcuts is that there's already over 150 options for the popup alone, and each additional trigger will cause any modifiable setting (for now it's only Popup Action, but it will support more soon) to be multiplied by the number of available triggers. Firefox already struggles quite severely in displaying the popup tab in the options page (I have to spend some time to see if I can find a way to lessen the load), and it's already pretty difficult to navigate.

If this would actually be helpful to you (or someone else), then sure, I have absolutely no problem adding it, but in this case, I'd rather not add it just for the sake of completeness either.

I think the proper solution would be to add some kind of way of adding an arbitrary (user-defined) amount of triggers, but that would require a bit of reorganization with how the settings are loaded. This is more of just a temporary work-around until then :)

Hlsgs commented 3 years ago

I think the proper solution would be to add some kind of way of adding an arbitrary (user-defined) amount of triggers, but that would require a bit of reorganization with how the settings are loaded. This is more of just a temporary work-around until then :)

And it it 100% covers what I was asking, so thank you. My suggestion for adding more than the two triggers you've mentioned was just that, a suggestion. I'll be quite happy if i can default to open in background tab and have just the one other shortcut for opening the popup. Thank you!

Hlsgs commented 3 years ago

Hi @qsniyg , just udpated to v15. When trigger #2 is set, the first trigger activates Popup action (#2) and the second trigger doesn't work at all.

qsniyg commented 3 years ago

@Hlsgs Could you send your settings (through the Export) button and upload them here? It works fine on my end, so I'm guessing there must be some kind of edge I didn't account for...

Hlsgs commented 3 years ago

Ofcourse:

{"imu_enabled":true,"language":"en","check_updates":true,"check_update_interval":24,"check_update_notify":false,"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":true,"redirect_history":false,"redirect_extension":true,"canhead_get":true,"redirect_force_page":false,"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":"newtab_bg","t2_mouseover_open_behavior":"popup","mouseover_trigger_behavior":"keyboard","mouseover_trigger_key":[["alt","q"]],"mouseover_trigger_key_t2":[["shift","alt","q"]],"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_use_hold_key":true,"mouseover_hold_key":["i"],"mouseover_hold_position_center":false,"mouseover_hold_close_unhold":false,"mouseover_hold_unclickthrough":true,"mouseover_close_el_policy":"both","mouseover_close_click_outside":true,"mouseover_allow_partial":"video","mouseover_partial_avoid_head":false,"mouseover_use_blob_over_data":false,"mouseover_enable_notallowed":true,"mouseover_enable_notallowed_cant_load":true,"mouseover_notallowed_duration":300,"mouseover_minimum_size":20,"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_video_controls":true,"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_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":true,"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_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_scrollx_behavior":"gallery","mouseover_scrolly_video_behavior":"default","mouseover_scrolly_video_invert":false,"mouseover_scrollx_video_behavior":"default","scroll_override_page":false,"scroll_zoom_origin":"cursor","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":["center"],"mouseover_prevent_cursor_overlap":true,"mouseover_add_link":true,"mouseover_add_video_link":true,"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":false,"mouseover_only_valid_links":true,"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_styles":"","mouseover_enable_fade":true,"mouseover_enable_zoom_effect":false,"mouseover_zoom_effect_move":false,"mouseover_fade_time":100,"mouseover_enable_mask_styles":false,"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":[["alt","q"]],"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_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,"allow_video":true,"allow_dash_video":false,"allow_hls_video":false,"custom_xhr_for_lib":false,"hls_dash_use_max":true,"max_video_quality":null,"allow_watermark":false,"allow_smaller":false,"allow_possibly_different":false,"allow_possibly_broken":false,"allow_possibly_upscaled":false,"allow_thirdparty":false,"allow_apicalls":true,"allow_thirdparty_libs":false,"allow_thirdparty_code":false,"allow_bruteforce":true,"process_format":{},"deviantart_prefer_size":true,"deviantart_support_download":true,"ehentai_full_image":true,"imgur_filename":false,"imgur_source":false,"instagram_use_app_api":true,"instagram_dont_use_web":false,"instagram_prefer_video_quality":true,"instagram_gallery_postlink":true,"snapchat_orig_media":true,"tiktok_no_watermarks":false,"tiktok_thirdparty":null,"tumblr_api_key":"xrMpLM8n1eCeL3oRYSZG7CLALw6EHhYDdU6Wq5eD1PbMkld7Y1","bigimage_blacklist":"","bigimage_blacklist_engine":"glob","filename_format":"{author_username} {filename}","replaceimgs_enable_keybinding":false,"replaceimgs_keybinding":["shift","alt","r"],"replaceimgs_auto":false,"replaceimgs_replaceimgs":true,"replaceimgs_addlinks":false,"replaceimgs_replacelinks":false,"replaceimgs_links_newtab":false,"replaceimgs_usedata":false,"replaceimgs_wait_fullyloaded":true,"replaceimgs_totallimit":8,"replaceimgs_domainlimit":2,"replaceimgs_delay":0,"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":1608318603578,"last_update_version":"0.14.10","last_update_url":null,"settings_version":7}
qsniyg commented 3 years ago

@Hlsgs Ah, I hadn't tested it with similar triggers! Should be fixed with: https://github.com/qsniyg/maxurl/commit/eb27bb86fe5b05aff5dd97c9e834733dd0cec661

Which version of the script are you using? I can send you a built version if you'd like.

Hlsgs commented 3 years ago

No worries, I'll udpate through the normal channels in due time and report back if anyhting. Thank you!