diff --git a/GlobalSpeed.json b/GlobalSpeed.json index 8766596..666d7a6 100644 --- a/GlobalSpeed.json +++ b/GlobalSpeed.json @@ -1,230 +1 @@ -{ - "version": 10, - "firstUse": 1694671940909, - "keybinds": [ - { - "id": "9219623017", - "command": "adjustSpeed", - "enabled": true, - "greedy": true, - "adjustMode": 2, - "key": "KeyA", - "valueNumberAlt": -0.1 - }, - { - "id": "1126559432", - "command": "adjustSpeed", - "enabled": true, - "greedy": true, - "adjustMode": 1, - "key": "KeyS", - "valueNumber": 1 - }, - { - "id": "338433787", - "command": "adjustSpeed", - "enabled": true, - "greedy": true, - "adjustMode": 2, - "key": "KeyD", - "valueNumberAlt": 0.1, - "spacing": 1 - }, - { - "id": "4917967218", - "command": "setPin", - "enabled": true, - "greedy": true, - "valueState": "toggle", - "key": "KeyQ" - }, - { - "id": "6240397606", - "command": "setState", - "enabled": true, - "greedy": true, - "valueState": "toggle", - "key": { "code": "KeyQ", "shiftKey": true }, - "spacing": 2 - }, - { - "id": "9617520623", - "command": "seek", - "enabled": true, - "greedy": true, - "valueNumber": -5, - "key": "KeyZ" - }, - { - "id": "3952959453", - "command": "seek", - "enabled": true, - "greedy": true, - "valueNumber": 10, - "key": "KeyX", - "spacing": 1 - }, - { - "id": "4817593839", - "command": "seek", - "enabled": true, - "greedy": true, - "valueNumber": -0.041, - "key": { "shiftKey": true, "code": "KeyZ" }, - "valueBool3": true - }, - { - "id": "3783423079", - "command": "seek", - "enabled": true, - "greedy": true, - "valueNumber": 0.041, - "key": { "shiftKey": true, "code": "KeyX" }, - "spacing": 1, - "valueBool3": true - }, - { - "id": "5316421226", - "command": "fullscreen", - "enabled": true, - "greedy": true, - "key": { "shiftKey": true, "code": "KeyF" }, - "valueBool": true, - "spacing": 2 - }, - { - "id": "9228285493", - "command": "setMark", - "enabled": true, - "greedy": true, - "valueString": "mark1", - "key": { "shiftKey": true, "code": "KeyW" } - }, - { - "id": "6993283028", - "command": "seekMark", - "enabled": true, - "greedy": true, - "valueString": "mark1", - "key": "KeyW" - }, - { - "id": "2023326068", - "command": "toggleLoop", - "enabled": false, - "greedy": true, - "valueString": "mark1", - "key": "KeyR", - "spacing": 2 - }, - { - "id": "5032727447", - "command": "adjustFilter", - "filterOption": "invert", - "enabled": false, - "greedy": true, - "filterTarget": "both", - "adjustMode": 3, - "key": { "code": "KeyE" }, - "valueCycle": [0, 1] - }, - { - "id": "3912898463", - "command": "adjustFilter", - "filterOption": "grayscale", - "enabled": false, - "greedy": true, - "filterTarget": "backdrop", - "adjustMode": 3, - "key": { "code": "KeyE", "shiftKey": true }, - "valueCycle": [0, 1], - "spacing": 2 - } - ], - "common": { - "speed": 1.5, - "enabled": true, - "backdropFx": { - "filters": [ - { "name": "sepia", "value": 0 }, - { "name": "hueRotate", "value": 0 }, - { "name": "grayscale", "value": 0 }, - { "name": "contrast", "value": 1 }, - { "name": "brightness", "value": 1 }, - { "name": "saturate", "value": 1 }, - { "name": "invert", "value": 0 }, - { "name": "blur", "value": 0 }, - { "name": "opacity", "value": 1 } - ], - "transforms": [ - { "name": "scaleX", "value": 1 }, - { "name": "scaleY", "value": 1 }, - { "name": "translateX", "value": 0 }, - { "name": "translateY", "value": 0 }, - { "name": "rotateX", "value": 0 }, - { "name": "rotateY", "value": 0 }, - { "name": "rotateZ", "value": 0 } - ] - }, - "elementFx": { - "filters": [ - { "name": "sepia", "value": 0 }, - { "name": "hueRotate", "value": 0 }, - { "name": "grayscale", "value": 0 }, - { "name": "contrast", "value": 1 }, - { "name": "brightness", "value": 1 }, - { "name": "saturate", "value": 1 }, - { "name": "invert", "value": 0 }, - { "name": "blur", "value": 0 }, - { "name": "opacity", "value": 1 } - ], - "transforms": [ - { "name": "scaleX", "value": 1 }, - { "name": "scaleY", "value": 1 }, - { "name": "translateX", "value": 0 }, - { "name": "translateY", "value": 0 }, - { "name": "rotateX", "value": 0 }, - { "name": "rotateY", "value": 0 }, - { "name": "rotateZ", "value": 0 } - ] - }, - "audioFx": { - "pitch": 0, - "volume": 1, - "delay": 0, - "eq": { - "enabled": false, - "factor": 1, - "values": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] - } - }, - "lastSpeed": 1.5 - }, - "hideMediaView": null, - "rules": [ - { - "id": "7917318443", - "enabled": true, - "condition": { - "parts": [ - { - "type": "STARTS_WITH", - "value": "https://www.twitch.tv", - "id": "1363658767" - }, - { - "type": "STARTS_WITH", - "value": "https://www.twitch.tv/videos/", - "id": "10566855", - "inverse": true - } - ], - "matchAll": true - }, - "type": "SPEED", - "overrideSpeed": 1, - "strict": false, - "initialLoadOnly": true - } - ] -} +{"common":{"audioFx":{"delay":0,"eq":{"enabled":false,"factor":1,"values":[0,0,0,0,0,0,0,0,0,0]},"pitch":0,"volume":1},"backdropFx":{"filters":[{"name":"sepia","value":0},{"name":"hueRotate","value":0},{"name":"grayscale","value":0},{"name":"contrast","value":1},{"name":"brightness","value":1},{"name":"saturate","value":1},{"name":"invert","value":0},{"name":"blur","value":0},{"name":"opacity","value":1}],"transforms":[{"name":"scaleX","value":1},{"name":"scaleY","value":1},{"name":"translateX","value":0},{"name":"translateY","value":0},{"name":"rotateX","value":0},{"name":"rotateY","value":0},{"name":"rotateZ","value":0}]},"elementFx":{"filters":[{"name":"sepia","value":0},{"name":"hueRotate","value":0},{"name":"grayscale","value":0},{"name":"contrast","value":1},{"name":"brightness","value":1},{"name":"saturate","value":1},{"name":"invert","value":0},{"name":"blur","value":0},{"name":"opacity","value":1}],"transforms":[{"name":"scaleX","value":1},{"name":"scaleY","value":1},{"name":"translateX","value":0},{"name":"translateY","value":0},{"name":"rotateX","value":0},{"name":"rotateY","value":0},{"name":"rotateZ","value":0}]},"enabled":true,"lastSpeed":1,"speed":1.5,"enabledLatestViaPopup":true},"firstUse":1694671940909,"hideMediaView":null,"keybinds":[{"id":"4596707722","command":"adjustSpeed","enabled":true,"greedy":true,"adjustMode":1,"key":{"ctrlKey":false,"altKey":true,"shiftKey":false,"metaKey":false,"code":"KeyW"},"valueNumber":16,"spacing":1},{"id":"6011196606","command":"adjustSpeed","enabled":true,"greedy":true,"adjustMode":1,"key":{"ctrlKey":false,"altKey":true,"shiftKey":false,"metaKey":false,"code":"KeyA"},"valueNumber":1},{"id":"2987204519","command":"adjustSpeed","enabled":true,"greedy":true,"adjustMode":1,"key":{"ctrlKey":false,"altKey":true,"shiftKey":false,"metaKey":false,"code":"KeyS"},"valueNumber":1.5},{"id":"6368642066","command":"adjustSpeed","enabled":true,"greedy":true,"adjustMode":1,"key":{"ctrlKey":false,"altKey":true,"shiftKey":false,"metaKey":false,"code":"KeyD"},"valueNumber":2}],"rules":[{"condition":{"matchAll":true,"parts":[{"id":"1363658767","type":"STARTS_WITH","value":"https://www.twitch.tv"},{"id":"10566855","inverse":true,"type":"STARTS_WITH","value":"https://www.twitch.tv/videos/"}]},"enabled":true,"id":"7917318443","initialLoadOnly":true,"overrideSpeed":1,"strict":false,"type":"SPEED"},{"id":"2162403328","enabled":true,"condition":{"parts":[{"type":"STARTS_WITH","value":"https://soundcloud.com/","id":"6221094071"},{"type":"STARTS_WITH","value":"https://music.youtube.com/","id":"3045068550"},{"type":"CONTAINS","value":"bandcamp.com/","id":"5314024901"}]},"type":"SPEED","overrideSpeed":1,"strict":false,"initialLoadOnly":true},{"id":"616720958","enabled":true,"condition":{"parts":[{"type":"STARTS_WITH","value":"https://www.pornhub.com","id":"5236953739"},{"type":"STARTS_WITH","value":"https://rule34video.com","id":"5889183488"},{"type":"STARTS_WITH","value":"https://www.instagram.com","id":"1830668913"}]},"type":"SPEED","overrideSpeed":1,"strict":false,"initialLoadOnly":true}],"speedPresets":[0.25,0.5,0.75,1,1.5,2,3,4,6,8,10,16],"version":10} \ No newline at end of file diff --git a/_install.sh b/_install.sh new file mode 100755 index 0000000..0551707 --- /dev/null +++ b/_install.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +mkdir -p ~/.mozilla/firefox/dym/chrome/ + +cd '/My/config/browser-addons/' +ln -s `pwd`/userChrome.css \ + ~/.mozilla/firefox/dym/chrome/ # --force diff --git a/about-config.md b/about-config.md new file mode 100644 index 0000000..d7ec541 --- /dev/null +++ b/about-config.md @@ -0,0 +1,57 @@ +# Firefox + + +## Addons +see `~/bookmarks/addons-firefox.md` + + +## Theme +- [Dark](https://addons.mozilla.org/en-US/firefox/addon/nicothin-dark-theme/) – true gray dark theme + + +## about:config + +### don't trigger menu-focus on pressing alt +`ui.key.menuAccessKeyFocuses` = false + +### block auto-refresh/-redirects +> i.e. appstore +`accessibility.blockautorefresh` = true + +### tweak cache sizes +whichever of `browser.cache.` looks too small (in MB) + +### allow use of userChrome.css +> to customize browser-window look +`toolkit.legacyUserProfileCustomizations.stylesheets` = true + +### compact ui theme +`browser.uidensity` = 1 + +### Hi-Dpi correction +> so 100% zoom would closer match with monitor resolution (measured by `window.innerWidth`) +`layout.css.devPixelsPerPx` = 1.75 + +### enable css [backdrop-filter](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#browser_compatibility) +- `gfx.webrender.enabled` = true +- `gfx.webrender.all` = true +- `layout.css.backdrop-filter.enabled` = true + +### enable WebGL +- `webgl.disabled` = false +- `webgl.force-enabled` = true + +### disable [Ctrl+Q] +- `browser.quitShortcut.disabled` = true + +### only show latin letters in domain names (add `xn--` otherwise) +- `network.IDN_show_punycode` = true + +### distinguish `` +- `layout.forms.input-type-search.enabled` = true + + +## Cookies + +### always-block +- `medium.com` diff --git a/floccus.json b/floccus.json new file mode 100644 index 0000000..73d4a56 --- /dev/null +++ b/floccus.json @@ -0,0 +1,21 @@ +[ + { + "localRoot": "root________", + "strategy": "default", + "syncInterval": 480, + "nestedSync": true, + "failsafe": true, + "allowNetwork": false, + "type": "nextcloud-bookmarks", + "url": "https://docs.aggents.com", + "username": "dym", + "password": "ULDxurPAPzSpjC8LJPkQ84qDMSL5ulppw3jl5bRtSaSofeBJphAZhx1FpjGT9EBqJYbnnlqp", + "serverRoot": "", + "includeCredentials": false, + "allowRedirects": false, + "enabled": true, + "syncing": 0.5353535353535354, + "scheduled": false, + "error": null + } +] \ No newline at end of file diff --git a/keepassxc.json b/keepassxc.json index b841311..c7b497d 100644 --- a/keepassxc.json +++ b/keepassxc.json @@ -1,26 +1 @@ -{ - "autoCompleteUsernames": true, - "showGroupNameInAutocomplete": true, - "autoFillAndSend": false, - "autoFillSingleEntry": true, - "autoReconnect": false, - "autoRetrieveCredentials": true, - "autoSubmit": false, - "checkUpdateKeePassXC": 3, - "colorTheme": "dark", - "defaultGroup": "", - "defaultGroupAlwaysAsk": false, - "redirectAllowance": 1, - "saveDomainOnly": true, - "showLoginFormIcon": false, - "showLoginNotifications": false, - "showNotifications": true, - "showOTPIcon": false, - "usePasswordGeneratorIcons": false, - "useObserver": true, - "usePredefinedSites": true, - "sitePreferences": [], - "saveDomainOnlyNewCreds": true, - "clearCredentialsTimeout": 10, - "credentialSorting": "sortByGroupAndTitle" -} +{"autoCompleteUsernames":true,"showGroupNameInAutocomplete":true,"autoFillAndSend":false,"autoFillSingleEntry":true,"autoReconnect":false,"autoRetrieveCredentials":true,"autoSubmit":false,"checkUpdateKeePassXC":3,"colorTheme":"dark","defaultGroup":"","defaultGroupAlwaysAsk":false,"redirectAllowance":1,"saveDomainOnly":true,"showLoginFormIcon":false,"showLoginNotifications":false,"showNotifications":true,"showOTPIcon":false,"usePasswordGeneratorIcons":false,"useObserver":true,"usePredefinedSites":true,"sitePreferences":[],"saveDomainOnlyNewCreds":true,"clearCredentialsTimeout":10,"credentialSorting":"sortByGroupAndTitle","afterFillSorting":"sortByMatchingCredentials","afterFillSortingTotp":"sortByRelevantEntry","autoFillSingleTotp":false,"debugLogging":false,"downloadFaviconAfterSave":false,"passkeys":false,"passkeysFallback":true,"showGettingStartedGuideAlert":false,"showTroubleshootingGuideAlert":true,"useMonochromeToolbarIcon":false} \ No newline at end of file diff --git a/maxurl-settings.txt b/maxurl-settings.txt new file mode 100644 index 0000000..cc293b9 --- /dev/null +++ b/maxurl-settings.txt @@ -0,0 +1 @@ +{"imu_enabled":true,"language":"en","check_updates":true,"check_update_interval":24,"check_update_notify":false,"dark_mode":true,"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,"enable_console_logging":true,"write_to_clipboard":false,"redirect":true,"redirect_video":false,"redirect_audio":false,"redirect_history":true,"redirect_extension":true,"canhead_get":true,"redirect_force_page":true,"redirect_enable_infobox":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":"popup","t2_mouseover_open_behavior":"popup","t3_mouseover_open_behavior":"popup","mouseover_trigger_behavior":"keyboard","mouseover_trigger_key":[["t"]],"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":"video","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,"t2_mouseover_minimum_size":20,"t3_mouseover_minimum_size":20,"popup_maximum_source_size":0,"t2_popup_maximum_source_size":0,"t3_popup_maximum_source_size":0,"mouseover_exclude_backgroundimages":false,"t2_mouseover_exclude_backgroundimages":false,"t3_mouseover_exclude_backgroundimages":false,"mouseover_exclude_page_bg":true,"t2_mouseover_exclude_page_bg":true,"t3_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","popup_enable_subtitles":true,"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_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":true,"allow_smaller":false,"allow_possibly_different":false,"allow_possibly_broken":false,"allow_possibly_upscaled":true,"allow_uncropped":true,"allow_thirdparty":false,"allow_apicalls":true,"allow_thirdparty_libs":false,"custom_xhr_for_lib":false,"bypass_csp_for_lib":false,"use_webarchive_for_lib":false,"lib_integrity_check":true,"allow_thirdparty_code":false,"allow_bruteforce":true,"allow_webarchive":false,"process_format":{},"browser_cookies":true,"deviantart_prefer_size":false,"deviantart_support_download":true,"ehentai_full_image":true,"imgur_filename":true,"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,"teddit_redirect_reddit":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":true,"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":1697476731750,"last_update_version":"2023.10.0","last_update_url":null,"settings_version":11} \ No newline at end of file diff --git a/stylus.json b/stylus.json new file mode 100644 index 0000000..032847f --- /dev/null +++ b/stylus.json @@ -0,0 +1,214 @@ +[ + { + "settings": { + "openEditInWindow": false, + "openEditInWindow.popup": false, + "windowPosition": {}, + "show-badge": true, + "disableAll": false, + "exposeIframes": false, + "exposeStyleName": false, + "newStyleAsUsercss": false, + "styleViaASS": false, + "styleViaXhr": false, + "patchCsp": false, + "urlInstaller": true, + "config.autosave": true, + "schemeSwitcher.enabled": "system", + "schemeSwitcher.nightStart": "18:00", + "schemeSwitcher.nightEnd": "06:00", + "popup.enabledFirst": true, + "popup.stylesFirst": true, + "popup.autoResort": false, + "popup.borders": false, + "popup.findSort": "u", + "manage.onlyEnabled": false, + "manage.onlyLocal": false, + "manage.onlyUsercss": false, + "manage.onlyEnabled.invert": false, + "manage.onlyLocal.invert": false, + "manage.onlyUsercss.invert": false, + "manage.actions.expanded": true, + "manage.backup.expanded": true, + "manage.filters.expanded": true, + "manage.minColumnWidth": 750, + "manage.newUI": true, + "manage.newUI.favicons": false, + "manage.newUI.faviconsGray": true, + "manage.newUI.targets": 3, + "manage.newUI.sort": "title,asc", + "manage.searchMode": "meta", + "editor.options": {}, + "editor.toc.expanded": true, + "editor.options.expanded": true, + "editor.lint.expanded": false, + "editor.publish.expanded": true, + "editor.lineWrapping": true, + "editor.smartIndent": true, + "editor.indentWithTabs": false, + "editor.tabSize": 2, + "editor.keyMap": "default", + "editor.theme": "default", + "editor.beautify": { + "selector_separator_newline": true, + "newline_before_open_brace": false, + "newline_after_open_brace": true, + "newline_between_properties": true, + "newline_before_close_brace": true, + "newline_between_rules": false, + "preserve_newlines": true, + "end_with_newline": false, + "indent_conditional": true + }, + "editor.beautify.hotkey": "", + "editor.lintDelay": 300, + "editor.linter": "csslint", + "editor.lintReportDelay": 500, + "editor.matchHighlight": "token", + "editor.autoCloseBrackets": true, + "editor.autocompleteOnTyping": false, + "editor.contextDelete": false, + "editor.selectByTokens": true, + "editor.arrowKeysTraverse": true, + "editor.appliesToLineWidget": true, + "editor.autosaveDraft": 10, + "editor.livePreview": true, + "editor.targetsFirst": true, + "editor.colorpicker": true, + "editor.colorpicker.hexUppercase": false, + "editor.colorpicker.hotkey": "", + "editor.colorpicker.color": "", + "editor.colorpicker.maxHeight": 300, + "hotkey._execute_browser_action": "", + "hotkey.openManage": "", + "hotkey.styleDisableAll": "", + "sync.enabled": "none", + "iconset": 0, + "badgeDisabled": "#8B0000", + "badgeNormal": "#006666", + "headerWidth.edit": 280, + "headerWidth.install": 280, + "headerWidth.manage": 280, + "popupWidth": 246, + "popupWidthMax": 280, + "updateInterval": 24, + "updateOnlyEnabled": false, + "popup.breadcrumbs": true, + "popup.breadcrumbs.usePath": false + }, + "order": { + "main": [], + "prio": [] + } + }, + { + "enabled": true, + "installDate": 1713959548459, + "name": "behance-img-rightclick", + "sections": [ + { + "code": "/* ==UserStyle==\n@name behance-img-rightclick\n@description allow rightclick on image elements on behance.net\n@version 2024.01.10\n@namespace dym.sh\n@author Dym Sohin\n@homepageURL https://dym.sh/behance-img-rightclick/\n@supportURL https://source.garden/styles/behance-img-rightclick/issues/\n@license 0BSD\n==/UserStyle== */" + }, + { + "code": "#lightbox-wrap img \n{ pointer-events: unset }", + "urlPrefixes": [ + "https://www.behance.net/" + ] + } + ], + "updateDate": 1713959554410, + "_id": "f8fa2609-6f3b-4103-aa14-4d99cdd53ca4", + "_rev": 1713959554410, + "id": 1 + }, + { + "enabled": true, + "installDate": 1713959587763, + "sections": [ + { + "code": "" + } + ], + "sourceCode": "/* ==UserStyle==\n@name gravatar-chevron\n@description better chevron for buttons with icons, i.e. «Read our Privacy Policy»\n@version 2023.12.18\n@namespace dym.sh\n@author Dym Sohin\n@homepageURL https://dym.sh/gravatar-chevron/\n@updateURL https://source.garden/styles/gravatar-chevron/raw/branch/latest/style.user.css\n@supportURL https://source.garden/styles/gravatar-chevron/issues/\n@license 0BSD\n==/UserStyle== */\n\n@-moz-document domain(\"gravatar.com\") {\n\n.g-has-chevron-external::after {\n content: \"⭟\";\n font-weight: 700;\n margin-left: 0.75rem;\n line-height: 0.75rem;\n background: var(--g-color-accent);\n padding: 0.125rem;\n color: var(--g-background);\n border-radius: 0.125rem;\n}\n\n.g-has-chevron-external:active::after\n, .g-has-chevron-external:hover::after {\n background: var(--g-color);\n}\n\n\n.g-has-chevron-external::after\n, .g-has-chevron-external:active::after\n, .g-has-chevron-external:hover::after {\n left: unset;\n margin-right: unset;\n top: unset;\n -webkit-transform: unset;\n transform: unset;\n -webkit-transform-origin: unset;\n transform-origin: unset;\n}\n\n}\n", + "usercssData": { + "name": "gravatar-chevron", + "description": "better chevron for buttons with icons, i.e. «Read our Privacy Policy»", + "version": "2023.12.18", + "namespace": "dym.sh", + "author": "Dym Sohin", + "homepageURL": "https://dym.sh/gravatar-chevron/", + "updateURL": "https://source.garden/styles/gravatar-chevron/raw/branch/latest/style.user.css", + "supportURL": "https://source.garden/styles/gravatar-chevron/issues/", + "license": "0BSD" + }, + "author": "Dym Sohin", + "description": "better chevron for buttons with icons, i.e. «Read our Privacy Policy»", + "url": "https://dym.sh/gravatar-chevron/", + "updateUrl": "https://source.garden/styles/gravatar-chevron/raw/branch/latest/style.user.css", + "name": "gravatar-chevron", + "originalDigest": "ce7c919323dac157b36d8de60af6e2f4d3b4f656", + "_id": "fb5128bd-a633-4b8f-bea8-a27e6985a4f4", + "_rev": 1713959587764, + "id": 2 + }, + { + "enabled": true, + "installDate": 1713959597271, + "sections": [ + { + "code": "" + } + ], + "sourceCode": "/* ==UserStyle==\n@name translit-dark\n@description Dark Mode for Translit.net\n@version 2023.10.06\n@namespace translit.net\n@author Dym Sohin\n@homepageURL https://dym.sh/translit-dark/\n@updateURL https://source.garden/styles/translit-dark/raw/branch/latest/style.user.css\n@supportURL https://source.garden/styles/translit-dark/issues\n@license 0BSD\n==/UserStyle== */\n\n@-moz-document domain(\"translit.net\")\n{\n\n* { background : transparent !important\n ; color : #bbb !important\n }\n\nbody\n, .bcharset\n { background : #222 !important }\n\nul#tTabCell li:nth-of-type(2n)\n { background : #333 !important }\n\ninput\n, button\n, select\n, textarea\n { background : #333 !important\n ; border : 1px solid #222 !important\n }\n\n.tTextArea120\n, .tWzgBlock120\n { padding-right : 0 !important }\n\np\n, .tBottomContainer\n, .tLogoContainer\n, .tCookiesButtonA\n, .tAdvContainer\n, .tBoxAdv\n, .tBannerRight120\n, #placeholder\n { display : none !important }\n\n}\n", + "usercssData": { + "name": "translit-dark", + "description": "Dark Mode for Translit.net", + "version": "2023.10.06", + "namespace": "translit.net", + "author": "Dym Sohin", + "homepageURL": "https://dym.sh/translit-dark/", + "updateURL": "https://source.garden/styles/translit-dark/raw/branch/latest/style.user.css", + "supportURL": "https://source.garden/styles/translit-dark/issues", + "license": "0BSD" + }, + "author": "Dym Sohin", + "description": "Dark Mode for Translit.net", + "url": "https://dym.sh/translit-dark/", + "updateUrl": "https://source.garden/styles/translit-dark/raw/branch/latest/style.user.css", + "name": "translit-dark", + "originalDigest": "1feaf0e9b0e38adc9857cb5feadef0f7dfc6438c", + "_id": "193da0ee-6329-482e-9c68-a557da4c5174", + "_rev": 1713959597272, + "id": 3 + }, + { + "enabled": true, + "installDate": 1714495560394, + "sections": [ + { + "code": "" + } + ], + "sourceCode": "/* ==UserStyle==\n@name tonsky-neutral-gray\n@description Neutral Gray for Tonsky.me\n@version 2024.04.30\n@namespace source.garden\n@author Dym Sohin\n@homepageURL https://dym.sh/tonsky-neutral-gray/\n@updateURL https://source.garden/styles/tonsky-neutral-gray/raw/branch/latest/style.user.css\n@supportURL https://source.garden/styles/tonsky-neutral-gray/issues/\n@license 0BSD\n==/UserStyle== */\n\n@-moz-document url-prefix(\"https://tonsky.me/\")\n{\n body {\n background: #ccc;\n }\n .about_photo {\n filter: grayscale(1);\n }\n}\n", + "usercssData": { + "name": "tonsky-neutral-gray", + "description": "Neutral Gray for Tonsky.me", + "version": "2024.04.30", + "namespace": "source.garden", + "author": "Dym Sohin", + "homepageURL": "https://dym.sh/tonsky-neutral-gray/", + "updateURL": "https://source.garden/styles/tonsky-neutral-gray/raw/branch/latest/style.user.css", + "supportURL": "https://source.garden/styles/tonsky-neutral-gray/issues/", + "license": "0BSD" + }, + "author": "Dym Sohin", + "description": "Neutral Gray for Tonsky.me", + "url": "https://dym.sh/tonsky-neutral-gray/", + "updateUrl": "https://source.garden/styles/tonsky-neutral-gray/raw/branch/latest/style.user.css", + "name": "tonsky-neutral-gray", + "originalDigest": "0d3e50dce1a4d841402ec902afde9da614b957a6", + "_id": "3b9e8d29-451c-456f-af65-f1051238691c", + "_rev": 1714495560395, + "id": 5 + } +] \ No newline at end of file diff --git a/tampermonkey.json b/tampermonkey.json new file mode 100644 index 0000000..a178354 --- /dev/null +++ b/tampermonkey.json @@ -0,0 +1,268 @@ +{ + "created_by": "Tampermonkey", + "version": "1", + "scripts": + [ + { + "name": "YouTube: Hide Watched Videos", + "options": + { + "check_for_updates": true, + "user_modified": null, + "comment": null, + "compatopts_for_requires": true, + "compat_wrappedjsobject": false, + "compat_metadata": false, + "compat_foreach": false, + "compat_powerful_this": null, + "sandbox": null, + "noframes": null, + "unwrap": null, + "run_at": null, + "tab_types": null, + "override": + { + "use_includes": + [], + "orig_includes": + [], + "merge_includes": true, + "use_matches": + [], + "orig_matches": + [ + "http://*.youtube.com/*", + "http://youtube.com/*", + "https://*.youtube.com/*", + "https://youtube.com/*" + ], + "merge_matches": true, + "use_excludes": + [], + "orig_excludes": + [], + "merge_excludes": true, + "use_connects": + [], + "orig_connects": + [], + "merge_connects": true, + "use_blockers": + [], + "orig_run_at": "document-idle", + "orig_noframes": true + } + }, + "storage": + { + "ts": 1717332398540, + "data": + {} + }, + "enabled": true, + "position": 1, + "file_url": "https://update.greasyfork.org/scripts/13040/YouTube%3A%20Hide%20Watched%20Videos.user.js", + "uuid": "f83161f4-fa69-45a5-a6f6-8396c33d456b", + "source": "Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICBZb3VUdWJlOiBIaWRlIFdhdGNoZWQgVmlkZW9zCi8vIEBuYW1lc3BhY2UgICAgaHR0cHM6Ly93d3cuaGF1cy5nZy8KLy8gQHZlcnNpb24gICAgICA2LjMKLy8gQGxpY2Vuc2UgICAgICBNSVQKLy8gQGRlc2NyaXB0aW9uICBIaWRlcyB3YXRjaGVkIHZpZGVvcyAoYW5kIHNob3J0cykgZnJvbSB5b3VyIFlvdVR1YmUgc3Vic2NyaXB0aW9ucyBwYWdlLgovLyBAYXV0aG9yICAg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TsKCgkJCQlvYnMub2JzZXJ2ZShvYmosIHtjaGlsZExpc3Q6IHRydWUsIHN1YnRyZWU6IHRydWV9KTsKCQkJfSBlbHNlIGlmIChldmVudExpc3RlbmVyU3VwcG9ydGVkKSB7CgkJCQlvYmouYWRkRXZlbnRMaXN0ZW5lcignRE9NTm9kZUluc2VydGVkJywgY2FsbGJhY2ssIGZhbHNlKTsKCQkJCW9iai5hZGRFdmVudExpc3RlbmVyKCdET01Ob2RlUmVtb3ZlZCcsIGNhbGxiYWNrLCBmYWxzZSk7CgkJCX0KCQl9OwoJfSgpKTsKCgkvLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQoKCWxvZ0RlYnVnKCdTdGFydGluZyBTY3JpcHQnKTsKCgkvLyBZb3VUdWJlIGRvZXMgbmF2aWdhdGlvbiB2aWEgaGlzdG9yeSBhbmQgYWxzbyBkb2VzIGEgYnVuY2gKCS8vIG9mIEFKQVggdmlkZW8gbG9hZGluZy4gSW4gb3JkZXIgdG8gZW5zdXJlIHdlJ3JlIGFsd2F5cyB1cAoJLy8gdG8gZGF0ZSwgd2UgaGF2ZSB0byBsaXN0ZW4gZm9yIEFOWSBET00gY2hhbmdlIGV2ZW50LCBhbmQKCS8vIHJlLXJ1biBvdXIgc2NyaXB0LgoJb2JzZXJ2ZURPTShkb2N1bWVudC5ib2R5LCBydW4pOwoKCXJ1bigpOwp9KCkpOwo=", + "requires": + [ + { + "meta": + { + "name": "GM_config.js", + "url": "https://openuserjs.org/src/libs/sizzle/GM_config.js", + "ts": 1717332399295, + "mimetype": "text/javascript" + }, + "source": "LyoNCkNvcHlyaWdodCAyMDA5KywgR01fY29uZmlnIENvbnRyaWJ1dG9ycyAoaHR0cHM6Ly9naXRodWIuY29tL3NpenpsZW1jdHdpenpsZS9HTV9jb25maWcpDQoNCkdNX2NvbmZpZyBDb2xsYWJvcmF0b3JzL0NvbnRyaWJ1dG9yczoNCiAgICBNaW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QNCiAgICAgICAgICAgICAgICBzZXR0aW5ncy5maWVsZHMgPSBhcmc7IC8vIHN0b3JlIHNldHRpbmdzIG9iamVjdA0KICAgICAgICAgICAgICAgIGJyZWFrOyAvLyBsZWF2ZSB0aGUgbG9vcA0KICAgICAgICAgICAgICB9IC8vIG90aGVyd2lzZSBpdCBtdXN0IGJlIGEgY2FsbGJhY2sgZnVuY3Rpb24NCiAgICAgICAgICAgICAgaWYgKCFzZXR0aW5ncy5ldmVudHMpIHNldHRpbmdzLmV2ZW50cyA9IHt9Ow0KICAgICAgICAgICAgICBzZXR0aW5ncy5ldmVudHNbal0gPSBhcmdbal07DQogICAgICAgICAgICB9DQogICAgICAgICAgICBicmVhazsNCiAgICAgICAgICBjYXNlICdmdW5jdGlvbic6IC8vIHBhc3NpbmcgYSBiYXJlIGZ1bmN0aW9uIGlzIHNldCB0byBvcGVuIGNhbGxiYWNrDQogICAgICAgICAgICBzZXR0aW5ncy5ldmVudHMgPSB7b25PcGVuOiBhcmd9Ow0KICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgY2FzZSAnc3RyaW5nJzogLy8gY291bGQgYmUgY3VzdG9tIENTUyBvciB0aGUgdGl0bGUgc3RyaW5nDQogICAgICAgICAgICBpZiAoL1x3K1xzKlx7XHMqXHcrXHMqOlxzKlx3K1tcc3xcU10qXH0vLnRlc3QoYXJnKSkNCiAgICAgICAgICAgICAgc2V0dGluZ3MuY3NzID0gYXJnOw0KICAgICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgICBzZXR0aW5ncy50aXRsZSA9IGFyZzsNCiAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICB9DQogICAgICB9DQogICAgfQ0KDQogICAgLyogSW5pdGlhbGl6ZSBldmVyeXRoaW5nIHVzaW5nIHRoZSBuZXcgc2V0dGluZ3Mgb2JqZWN0ICovDQogICAgLy8gU2V0IHRoZSBpZA0KICAgIGlmIChzZXR0aW5ncy5pZCkgY29uZmlnLmlkID0gc2V0dGluZ3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cy5iYXNpYyA9IGNvbmZpZy5jc3MuYmFzaWMucmVwbGFjZSgNCiAgICAgICAgbmV3IFJlZ0V4cCgnIycgKyBjb25maWcuY3NzLmJhc2ljUHJlZml4LCAnZ20nKSwgJyMnICsgY29uZmlnLmlkKTsNCiAgICAgIGNvbmZpZy5jc3MuYmFzaWNQcmVmaXggPSBjb25maWcuaWQ7DQogICAgfQ0KDQogICAgLy8gQ3JlYXRlIHRoZSBmaWVsZHMNCiAgICBjb25maWcuaXNJbml0ID0gZmFsc2U7DQogICAgaWYgKHNldHRpbmdzLmZpZWxkcykgew0KICAgICAgY29uZmlnLnJlYWQobnVsbCwgKHN0b3JlZCkgPT4geyAvLyByZWFkIHRoZSBzdG9yZWQgc2V0dGluZ3MNCiAgICAgICAgbGV0IGZpZWxkcyA9IHNldHRpbmdzLmZpZWxkcywNCiAgICAgICAgICAgIGN1c3RvbVR5cGVzID0gc2V0dGluZ3MudHlwZXMgfHwge30sDQogICAgICAgICAgICBjb25maWdJZCA9IGNvbmZpZy5pZDsNCg0KICAgICAgICBmb3IgKGxldCBpZCBpbiBmaWVsZHMpIHsNCiAgICAgICAgICBsZXQgZmllbGQgPSBmaWVsZHNbaWRdLA0KICAgICAgICAgICAgICBmaWVsZEV4aXN0cyA9IGZhbHNlOw0KDQogICAgICAgICAgaWYgKGNvbmZpZy5maWVsZHNbaWRdKSB7DQogICAgICAgICAgICBmaWVsZEV4aXN0cyA9IHRydWU7DQogICAgICAgICAgfQ0KDQogICAgICAgICAgLy8gZm9yIGVhY2ggZmllbGQgZGVmaW5pdGlvbiBjcmVhdGUgYSBmaWVsZCBvYmplY3QNCiAgICAgICAgICBpZiAoZmllbGQpIHsNCiAgICAgICAgICAgIGlmIChjb25maWcuaXNPcGVuICYmIGZpZWxkRXhpc3RzKSB7DQogICAgICAgICAgICAgICAgY29uZmlnLmZpZWxkc1tpZF0ucmVtb3ZlKCk7DQogICAgICAgICAgICB9DQoNCiAgICAgICAgICAgIGNvbmZpZy5maWVsZHNbaWRdID0gbmV3IEdNX2NvbmZpZ0ZpZWxkKGZpZWxkLCBzdG9yZWRbaWRdLCBpZCwNCiAgICAgICAgICAgICAgY3VzdG9tVHlwZXNbZmllbGQudHlwZV0sIGNvbmZpZ0lkKTsNCg0KICAgICAgICAgICAgLy8gQWRkIGZpZWxkIHRvIG9wZW4gZnJhbWUNCiAgICAgICAgICAgIGlmIChjb25maWcuaXNPcGVuKSB7DQogICAgICAgICAgICAgIGNvbmZpZy5maWVsZHNbaWRdLndyYXBwZXIgPSBjb25maWcuZmllbGRzW2lkXS50b05vZGUoKTsNCiAgICAgICAgICAgICAgY29uZmlnLmZyYW1lU2VjdGlvbi5hcHBlbmRDaGlsZChjb25maWcuZmllbGRzW2lkXS53cmFwcGVyKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICB9IGVsc2UgaWYgKCFmaWVsZCAmJiBmaWVsZEV4aXN0cykgew0KICAgICAgICAgICAgLy8gUmVtb3ZlIGZpZWxkIGZyb20gb3BlbiBmcmFtZQ0KICAgICAgICAgICAgaWYgKGNvbmZpZy5pc09wZW4pIHsNCiAgICAgICAgICAgICAgY29uZmlnLmZpZWxkc1tpZF0ucmVtb3ZlKCk7DQogICAgICAgICAgICB9DQoNCiAgICAgICAgICAgIGRlbGV0ZSBjb25maWcuZmllbGRzW2lkXTsNCiAgICAgICAgICB9DQogICAgICAgIH0NCg0KICAgICAgICBjb25maWcuaXNJbml0ID0gdHJ1ZTsNCiAgICAgICAgY29uZmlnLm9uSW5pdC5jYWxsKGNvbmZpZyk7DQogICAgICB9KTsNCiAgICB9IGVsc2Ugew0KICAgICAgY29uZmlnLmlzSW5pdCA9IHRydWU7DQogICAgICBjb25maWcub25Jbml0LmNhbGwoY29uZmlnKTsNCiAgICB9DQogIH0NCg0KICBsZXQgY29uc3RydWN0ID0gZnVuY3Rpb24gKCkgew0KICAgIC8vIFBhcnNpbmcgb2YgaW5wdXQgcHJvdmlkZWQgdmlhIGZyb250ZW5kcw0K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gICAgICAgIGlkOiBjb25maWdJZCArICdfc2VjdGlvbl9kZXNjXycgKyBzZWNOdW0NCiAgICAgICAgICAgICAgfSwgc2V0dGluZ3Muc2VjdGlvblsxXSkpOw0KICAgICAgICAgICAgKytzZWNOdW07DQogICAgICAgICAgfQ0KICAgICAgICAgIA0KICAgICAgICAgIGlmIChzZWNOdW0gPT09IDApIHsNCiAgICAgICAgICAgIHNlY3Rpb24gPSBib2R5V3JhcHBlci5hcHBlbmRDaGlsZChjcmVhdGUoJ2RpdicsIHsNCiAgICAgICAgICAgICAgICBjbGFzc05hbWU6ICdzZWN0aW9uX2hlYWRlcl9ob2xkZXInLA0KICAgICAgICAgICAgICAgIGlkOiBjb25maWdJZCArICdfc2VjdGlvbl8nICsgKHNlY051bSsrKQ0KICAgICAgICAgICAgfSkpOw0KICAgICAgICAgIH0NCg0KICAgICAgICAgIC8vIENyZWF0ZSBmaWVsZCBlbGVtZW50cyBhbmQgYXBwZW5kIHRvIGN1cnJlbnQgc2VjdGlvbg0KICAgICAgICAgIHNlY3Rpb24uYXBwZW5kQ2hpbGQoKGZpZWxkLndyYXBwZXIgPSBmaWVsZC50b05vZGUoKSkpOw0KICAgICAgICB9DQogICAgICAgIA0KICAgICAgICBjb25maWcuZnJhbWVTZWN0aW9uID0gc2VjdGlvbjsNCg0KICAgICAgICAvLyBBZGQgc2F2ZSBhbmQgY2xvc2UgYnV0dG9ucw0KICAgICAgICBib2R5V3JhcHBlci5hcHBlbmRDaGlsZChjcmVhdGUoJ2RpdicsDQogICAgICAgICAge2lkOiBjb25maWdJZCArICdfYnV0dG9uc19ob2xkZXInfSwNCg0KICAgICAgICAgIGNyZWF0ZSgnYnV0dG9uJywgew0KICAgICAgICAgICAgaWQ6IGNvbmZpZ0lkICsgJ19zYXZlQnRuJywNCiAgICAgICAgICAgIHRleHRDb250ZW50OiAnU2F2ZScsDQogICAgICAgICAgICB0aXRsZTogJ1NhdmUgc2V0dGluZ3MnLA0KICAgICAgICAgICAgY2xhc3NOYW1lOiAnc2F2ZWNsb3NlX2J1dHRvbnMnLA0KICAgICAgICAgICAgb25jbGljazogZnVuY3Rpb24gKCkgeyBjb25maWcuc2F2ZSgpOyB9DQogICAgICAgICAgfSksDQoNCiAgICAgICAgICBjcmVhdGUoJ2J1dHRvbicsIHsNCiAgICAgICAgICAgIGlkOiBjb25maWdJZCArICdfY2xvc2VCdG4nLA0KICAgICAgICAgICAgdGV4dENvbnRlbnQ6ICdDbG9zZScsDQogICAgICAgICAgICB0aXRsZTogJ0Nsb3NlIHdpbmRvdycsDQogICAgICAgICAgICBjbGFzc05hbWU6ICdzYXZlY2xvc2VfYnV0dG9ucycsDQogICAgICAgICAgICBvbmNsaWNrOiBmdW5jdGlvbiAoKSB7IGNvbmZpZy5jbG9zZSgpOyB9DQogICAgICAgICAgfSksDQoNCiAgICAgICAgICBjcmVhdGUoJ2RpdicsDQogICAgICAgICAgICB7Y2xhc3NOYW1lOiAncmVzZXRfaG9sZGVyIGJsb2NrJ30sDQoNCiAgICAgICAgICAgIC8vIFJlc2V0IGxpbmsNCiAgICAgICAgICAgIGNyZWF0ZSgnYScsIHsNCiAgICAgICAgICAgICAgaWQ6IGNvbmZpZ0lkICsgJ19yZXNldExpbmsnLA0KICAgICAgICAgICAgICB0ZXh0Q29udGVudDogJ1Jlc2V0IHRvIGRlZmF1bHRzJywNCiAgICAgICAgICAgICAgaHJlZjogJyMnLA0KICAgICAgICAgICAgICB0aXRsZTogJ1Jlc2V0IGZpZWxkcyB0byBkZWZhdWx0IHZhbHVlcycsDQogICAgICAgICAgICAgIGNsYXNzTmFtZTogJ3Jlc2V0JywNCiAgICAgICAgICAgICAgb25jbGljazogZnVuY3Rpb24oZSkgeyBlLnByZXZlbnREZWZhdWx0KCk7IGNvbmZpZy5yZXNldCgpOyB9DQogICAgICAgICAgICB9KQ0KICAgICAgICApKSk7DQoNCiAgICAgICAgYm9keS5hcHBlbmRDaGlsZChib2R5V3JhcHBlcik7IC8vIFBhaW50IGV2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HROb2RlKGFyZ3VtZW50c1swXSk7DQogICAgICAgICAgYnJlYWs7DQogICAgICAgIGRlZmF1bHQ6DQogICAgICAgICAgQSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoYXJndW1lbnRzWzBdKTsNCiAgICAgICAgICBCID0gYXJndW1lbnRzWzFdOw0KICAgICAgICAgIGZvciAobGV0IGIgaW4gQikgew0KICAgICAgICAgICAgaWYgKGIuaW5kZXhPZigib24iKSA9PSAwKQ0KICAgICAgICAgICAgICBBLmFkZEV2ZW50TGlzdGVuZXIoYi5zdWJzdHJpbmcoMiksIEJbYl0sIGZhbHNlKTsNCiAgICAgICAgICAgIGVsc2UgaWYgKCIsc3R5bGUsYWNjZXNza2V5LGlkLG5hbWUsc3JjLGhyZWYsd2hpY2gsZm9yIi5pbmRleE9mKCIsIiArDQogICAgICAgICAgICAgICAgICAgICBiLnRvTG93ZXJDYXNlKCkpICE9IC0xKQ0KICAgICAgICAgICAgICBBLnNldEF0dHJpYnV0ZShiLCBCW2JdKTsNCiAgICAgICAgICAgIGVsc2UNCiAgICAgICAgICAgICAgQVtiXSA9IEJbYl07DQogICAgICAgICAgfQ0KICAgICAgICAgIGlmICh0eXBlb2YgYXJndW1lbnRzWzJdID09ICJzdHJpbmciKQ0KICAgICAgICAgICAgQS5pbm5lckhUTUwgPSBhcmd1bWVudHNbMl07DQogICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgZm9yIChsZXQgaSA9IDIsIGxlbiA9IGFyZ3VtZW50cy5sZW5ndGg7IGkgPCBsZW47ICsraSkNCiAgICAgICAgICAgICAgQS5hcHBlbmRDaGlsZChhcmd1bWVudHNbaV0pOw0KICAgICAgfQ0KICAgICAgcmV0dXJuIEE7DQogICAgfSwNCg0KICAgIGNlbnRlcjogZnVuY3Rpb24gKCkgew0KICAgICAgbGV0IG5vZGUgPSB0aGlzLmZyYW1lOw0KICAgICAgaWYgKCFub2RlKSByZXR1cm47DQogICAgICBsZXQgc3R5bGUgPSBub2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nVsbDsNCg0KICAgIGxldCB3cmFwID0gbnVsbDsNCiAgICBzd2l0Y2ggKHR5cGUpIHsNCiAgICAgIGNhc2UgJ3RleHRhcmVhJzoNCiAgICAgICAgcmV0Tm9kZS5hcHBlbmRDaGlsZCgodGhpcy5ub2RlID0gY3JlYXRlKCd0ZXh0YXJlYScsIHsNCiAgICAgICAgICBpbm5lckhUTUw6IHZhbHVlLA0KICAgICAgICAgIGlkOiBjb25maWdJZCArICdfZmllbGRfJyArIGlkLA0KICAgICAgICAgIGNsYXNzTmFtZTogJ2Jsb2NrJywNCiAgICAgICAgICBjb2xzOiAoZmllbGQuY29scyA/IGZpZWxkLmNvbHMgOiAyMCksDQogICAgICAgICAgcm93czogKGZpZWxkLnJvd3MgPyBmaWVsZC5yb3dzIDogMikNCiAgICAgICAgfSkpKTsNCiAgICAgICAgYnJlYWs7DQogICAgICBjYXNlICdyYWRpbyc6DQogICAgICAgIHdyYXAgPSBjcmVhdGUoJ2RpdicsIHsNCiAgICAgICAgICBpZDogY29uZmlnSWQgKyAnX2ZpZWxkXycgKyBpZA0KICAgICAgICB9KTsNCiAgICAgICAgdGhpcy5ub2RlID0gd3JhcDsNCg0KICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gb3B0aW9ucy5sZW5ndGg7IGkgPCBsZW47ICsraSkgew0KICAgICAgICAgIGxldCByYWRMYWJlbCA9IGNyZWF0ZSgnbGFiZWwnLCB7DQogICAgICAgICAgICBjbGFzc05hbWU6ICdyYWRpb19sYWJlbCcNCiAgICAgICAgICB9LCBvcHRpb25zW2ldKTsNCg0KICAgICAgICAgIGxldCByYWQgPSB3cmFwLmFwcGVuZENoaWxkKGNyZWF0ZSgnaW5wdXQnLCB7DQogICAgICAgICAgICB2YWx1ZTogb3B0aW9uc1tpXSwNCiAgICAgICAgICAgIHR5cGU6ICdyYWRpbycsDQogICAgICAgICAgICBuYW1lOiBpZCwNCiAgICAgICAgICAgIGNoZWNrZWQ6IG9wdGlvbnNbaV0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pZDogY29uZmlnSWQgKyAnX2ZpZWxkXycgKyBpZCwNCiAgICAgICAgICB0eXBlOiB0eXBlLA0KICAgICAgICAgIHZhbHVlOiB0eXBlID09ICdidXR0b24nID8gZmllbGQubGFiZWwgOiB2YWx1ZQ0KICAgICAgICB9Ow0KDQogICAgICAgIHN3aXRjaCAodHlwZSkgew0KICAgICAgICAgIGNhc2UgJ2NoZWNrYm94JzoNCiAgICAgICAgICAgIHByb3BzLmNoZWNrZWQgPSB2YWx1ZTsNCiAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgIGNhc2UgJ2J1dHRvbic6DQogICAgICAgICAgICBwcm9wcy5zaXplID0gZmllbGQuc2l6ZSA/IGZpZWxkLnNpemUgOiAyNTsNCiAgICAgICAgICAgIGlmIChmaWVsZC5zY3JpcHQpIGZpZWxkLmNsaWNrID0gZmllbGQuc2NyaXB0Ow0KICAgICAgICAgICAgaWYgKGZpZWxkLmNsaWNrKSBwcm9wcy5vbmNsaWNrID0gZmllbGQuY2xpY2s7DQogICAgICAgICAgICBicmVhazsNCiAgICAgICAgICBjYXNlICdoaWRkZW4nOg0KICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgZGVmYXVsdDoNCiAgICAgICAgICAgIC8vIHR5cGUgPSB0ZXh0LCBpbnQsIG9yIGZsb2F0DQogICAgICAgICAgICBwcm9wcy50eXBlID0gJ3RleHQnOw0KICAgICAgICAgICAgcHJvcHMuc2l6ZSA9IGZpZWxkLnNpemUgPyBmaWVsZC5zaXplIDogMjU7DQogICAgICAgIH0NCg0KICAgICAgICByZXROb2RlLmFwcGVuZENoaWxkKCh0aGlzLm5vZGUgPSBjcmVhdGUoJ2lucHV0JywgcHJvcHMpKSk7DQogICAgfQ0KDQogICAgaWYgKGxhYmVsKSB7DQogICAgICAvLyBJZiB0aGUgbGFiZWwgaXMgcGFzc2VkIGZpcnN0LCBpbnNlcnQgaXQgYmVmb3JlIHRoZSBmaWVsZA0KICAgICAgLy8gZWxzZSBpbnNlcnQgaXQgYWZ0ZXINCiAgICAgIGlmICghbGFiZWxQb3MpDQogICAgICAgIGxhYmVsUG9zID0gZmlyc3RQcm9wID09ICJsYWJlbCIgfHwgdHlwZSA9PSAicmFkaW8iID8NCiAgICAgICAgICAibGVmdCIgOiAicmlnaHQiOw0KDQogICAgICBhZGRMYWJlbChsYWJlbFBvcywgbGFiZWwsIHJldE5vZGUpOw0KICAgIH0NCg0KICAgIHJldHVybiByZXROb2RlOw0KICB9LA0KDQogIHRvVmFsdWU6IGZ1bmN0aW9uKCkgew0KICAgIGxldCBub2RlID0gdGhpcy5ub2RlLA0KICAgICAgICBmaWVsZCA9IHRoaXMuc2V0dGluZ3MsDQogICAgICAgIHR5cGUgPSBmaWVsZC50eXBlLA0KICAgICAgICB1bnNpZ25lZCA9IGZhbHNlLA0KICAgICAgICBydmFsID0gbnVsbDsNCg0KICAgIGlmICghbm9kZSkgcmV0dXJuIHJ2YWw7DQoNCiAgICBpZiAodHlwZS5pbmRleE9mKCd1bnNpZ25lZCAnKSA9PSAwKSB7DQogICAgICB0eXBlID0gdHlwZS5zdWJzdHJpbmcoOSk7DQogICAgICB1bnNpZ25lZCA9IHRydWU7DQogICAgfQ0KDQogICAgc3dpdGNoICh0eXBlKSB7DQogICAgICBjYXNlICdjaGVja2JveCc6DQogICAgICAgIHJ2YWwgPSBub2RlLmNoZWNrZWQ7DQogICAgICAgIGJyZWFrOw0KICAgICAgY2FzZSAnc2VsZWN0JzoNCiAgICAgICAgcnZhbCA9IG5vZGVbbm9kZS5zZWxlY3RlZEluZGV4XS52YWx1ZTsNCiAgICAgICAgYnJlYWs7DQogICAgICBjYXNlICdyYWRpbyc6DQogICAgICAgIGxldCByYWRpb3MgPSBub2RlLmdldEVsZW1lbnRzQnlUYWdOYW1lKCdpbnB1dCcpOw0KICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gcmFkaW9zLmxlbmd0aDsgaSA8IGxlbjsgKytpKSB7DQogICAgICAgICAgaWYgKHJhZGlvc1tpXS5jaGVja2VkKQ0KICAgICAgICAgICAgcnZhbCA9IHJhZGlvc1tpXS52YWx1ZTsNCiAgICAgICAgfQ0KICAgICAgICBicmVhazsNCiAgICAgIGNhc2UgJ2J1dHRvbic6DQogICAgICAgIGJyZWFrOw0KICAgICAgY2FzZSAnaW50JzogY2FzZSAnaW50ZWdlcic6DQogICAgICBjYXNlICdmbG9hdCc6IGNhc2UgJ251bWJlcic6DQogICAgICAgIGxldCBudW0gPSBOdW1iZXIobm9kZS52YWx1ZSk7DQogICAgICAgIGxldCB3YXJuID0gJ0ZpZWxkIGxhYmVsZWQgIicgKyBmaWVsZC5sYWJlbCArICciIGV4cGVjdHMgYScgKw0KICAgICAgICAgICh1bnNpZ25lZCA/ICcgcG9zaXRpdmUgJyA6ICduICcpICsgJ2ludGVnZXIgdmFsdWUnOw0KDQogICAgICAgIGlmIChpc05hTihudW0pIHx8ICh0eXBlLnN1YnN0cigwLCAzKSA9PSAnaW50JyAmJg0KICAgICAgICAgICAgTWF0aC5jZWlsKG51bSkgIT0gTWF0aC5mbG9vcihudW0pKSB8fA0KICAgICAgICAgICAgKHVuc2lnbmVkICYmIG51bSA8IDApKSB7DQogICAgICAgICAgYWxlcnQod2FybiArICcuJyk7DQogICAgICAgICAgcmV0dXJuIG51bGw7DQogICAgICAgIH0NCg0KICAgICAgICBpZiAoIXRoaXMuX2NoZWNrTnVtYmVyUmFuZ2UobnVtLCB3YXJuKSkNCiAgICAgICAgICByZXR1cm4gbnVsbDsNCiAgICAgICAgcnZhbCA9IG51bTsNCiAgICAgICAgYnJlYWs7DQogICAgICBkZWZhdWx0Og0KICAgICAgICBydmFsID0gbm9kZS52YWx1ZTsNCiAgICAgICAgYnJlYWs7DQogICAgfQ0KDQogICAgcmV0dXJuIHJ2YWw7IC8vIHZhbHVlIHJlYWQgc3VjY2Vzc2Z1bGx5DQogIH0sDQoNCiAgcmVzZXQ6IGZ1bmN0aW9uKCkgew0KICAgIGxldCBub2RlID0gdGhpcy5ub2RlLA0KICAgICAgICBmaWVsZCA9IHRoaXMuc2V0dGluZ3MsDQogICAgICAgIHR5cGUgPSBmaWVsZC50eXBlOw0KDQogICAgaWYgKCFub2RlKSByZXR1cm47DQoNCiAgICBzd2l0Y2ggKHR5cGUpIHsNCiAgICAgIGNhc2UgJ2NoZWNrYm94JzoNCiAgICAgICAgbm9kZS5jaGVja2VkID0gdGhpc1snZGVmYXVsdCddOw0KICAgICAgICBicmVhazsNCiAgICAgIGNhc2UgJ3NlbGVjdCc6DQogICAgICAgIGZvciAobGV0IGkgPSAwLCBsZW4gPSBub2RlLm9wdGlvbnMubGVuZ3RoOyBpIDwgbGVuOyArK2kpIHsNCiAgICAgICAgICBpZiAobm9kZS5vcHRpb25zW2ldLnRleHRDb250ZW50ID09IHRoaXNbJ2RlZmF1bHQnXSkNCiAgICAgICAgICAgIG5vZGUuc2VsZWN0ZWRJbmRleCA9IGk7DQogICAgICAgIH0NCiAgICAgICAgYnJlYWs7DQogICAgICBjYXNlICdyYWRpbyc6DQogICAgICAgIGxldCByYWRpb3MgPSBub2RlLmdldEVsZW1lbnRzQnlUYWdOYW1lKCdpbnB1dCcpOw0KICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gcmFkaW9zLmxlbmd0aDsgaSA8IGxlbjsgKytpKSB7DQogICAgICAgICAgaWYgKHJhZGlvc1tpXS52YWx1ZSA9PSB0aGlzWydkZWZhdWx0J10pDQogICAgICAgICAgICByYWRpb3NbaV0uY2hlY2tlZCA9IHRydWU7DQogICAgICAgIH0NCiAgICAgICAgYnJlYWs7DQogICAgICBjYXNlICdidXR0b24nIDoNCiAgICAgICAgYnJlYWs7DQogICAgICBkZWZhdWx0Og0KICAgICAgICBub2RlLnZhbHVlID0gdGhpc1snZGVmYXVsdCddOw0KICAgICAgICBicmVhazsNCiAgICAgIH0NCiAgfSwNCg0KICByZW1vdmU6IGZ1bmN0aW9uKCkgew0KICAgIEdNX2NvbmZpZy5yZW1vdmUodGhpcy53cmFwcGVyKTsNCiAgICB0aGlzLndyYXBwZXIgPSBudWxsOw0KICAgIHRoaXMubm9kZSA9IG51bGw7DQogIH0sDQoNCiAgcmVsb2FkOiBmdW5jdGlvbigpIHsNCiAgICBsZXQgd3JhcHBlciA9IHRoaXMud3JhcHBlcjsNCiAgICBpZiAod3JhcHBlcikgew0KICAgICAgbGV0IGZpZWxkUGFyZW50ID0gd3JhcHBlci5wYXJlbnROb2RlOw0KICAgICAgbGV0IG5ld1dyYXBwZXIgPSB0aGlzLnRvTm9kZSgpOw0KICAgICAgZmllbGRQYXJlbnQuaW5zZXJ0QmVmb3JlKG5ld1dyYXBwZXIsIHdyYXBwZXIpOw0KICAgICAgR01fY29uZmlnLnJlbW92ZSh0aGlzLndyYXBwZXIpOw0KICAgICAgdGhpcy53cmFwcGVyID0gbmV3V3JhcHBlcjsNCiAgICB9DQogIH0sDQoNCiAgX2NoZWNrTnVtYmVyUmFuZ2U6IGZ1bmN0aW9uKG51bSwgd2Fybikgew0KICAgIGxldCBmaWVsZCA9IHRoaXMuc2V0dGluZ3M7DQogICAgaWYgKHR5cGVvZiBmaWVsZC5taW4gPT0gIm51bWJlciIgJiYgbnVtIDwgZmllbGQubWluKSB7DQogICAgICBhbGVydCh3YXJuICsgJyBncmVhdGVyIHRoYW4gb3IgZXF1YWwgdG8gJyArIGZpZWxkLm1pbiArICcuJyk7DQogICAgICByZXR1cm4gbnVsbDsNCiAgICB9DQoNCiAgICBpZiAodHlwZW9mIGZpZWxkLm1heCA9PSAibnVtYmVyIiAmJiBudW0gPiBmaWVsZC5tYXgpIHsNCiAgICAgIGFsZXJ0KHdhcm4gKyAnIGxlc3MgdGhhbiBvciBlcXVhbCB0byAnICsgZmllbGQubWF4ICsgJy4nKTsNCiAgICAgIHJldHVybiBudWxsOw0KICAgIH0NCiAgICByZXR1cm4gdHJ1ZTsNCiAgfQ0KfTsNCg==" + } + ] + }, + { + "name": "YouTube: Hide LONG Videos", + "options": + { + "check_for_updates": true, + "user_modified": null, + "comment": null, + "compatopts_for_requires": true, + "compat_wrappedjsobject": false, + "compat_metadata": false, + "compat_foreach": false, + "compat_powerful_this": null, + "sandbox": null, + "noframes": null, + "unwrap": null, + "run_at": null, + "tab_types": null, + "override": + { + "use_includes": + [], + "orig_includes": + [], + "merge_includes": true, + "use_matches": + [], + "orig_matches": + [ + "https://*.youtube.com/*", + "https://youtube.com/*" + ], + "merge_matches": true, + "use_excludes": + [], + "orig_excludes": + [], + "merge_excludes": true, + "use_connects": + [], + "orig_connects": + [], + "merge_connects": true, + "use_blockers": + [], + "orig_run_at": "document-idle", + "orig_noframes": true + } + }, + "storage": + { + "ts": 1717338755736, + "data": + {} + }, + "enabled": true, + "position": 2, + "file_url": "https://source.garden/scripts/yt-hide-long/raw/branch/latest/script.user.js", + "uuid": "8468d1fe-15ad-48f1-87ce-6c53fd8f927c", + "source": "Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUJCVlvdVR1YmU6IEhpZGUgTE9ORyBWaWRlb3MKLy8gQG5hbWVzcGFjZQlodHRwczovL3NvdXJjZS5nYXJkZW4KLy8gQHZlcnNpb24JCTEuMAovLyBAbGljZW5zZQkJQ0MwCi8vIEBkZXNjcmlwdGlvbglIaWRlIExPTkcgKG92ZXIgMjowMDowMCDigJMgdHdvIGhvdXJzKSB2aWRlb3Mgb24gWW91VHViZSdzIHBhZ2VzCi8vIEBhdXRob3IJCUR5bSBTb2hpbiA8cmVAZHltLnNoPgovLyBAbWF0Y2gJCWh0dHBzOi8vKi55b3V0dWJlLmNvbS8qCi8vIEBtYXRjaAkJaHR0cHM6Ly95b3V0dWJlLmNvbS8qCi8vIEBub2ZyYW1lcwovLyBAZG93bmxvYWRVUkwJaHR0cHM6Ly9zb3VyY2UuZ2FyZGVuL3NjcmlwdHMveXQtaGlkZS1sb25nL3Jhdy9icmFuY2gvbGF0ZXN0L3NjcmlwdC51c2VyLmpzCi8vIEB1cGRhdGVVUkwJaHR0cHM6Ly9zb3VyY2UuZ2FyZGVuL3NjcmlwdHMveXQtaGlkZS1sb25nL3Jhdy9icmFuY2gvbGF0ZXN0L3NjcmlwdC5tZXRhLmpzCi8vID09L1VzZXJTY3JpcHQ9PQoKKGZ1bmN0aW9uKCkgewoJJ3VzZSBzdHJpY3QnCgoJZnVuY3Rpb24gcmVtb3ZlVXBjb21pbmdWaWRlb3MoKXsKCQlkb2N1bWVudAoJCQkucXVlcnlTZWxlY3RvckFsbCggYHl0ZC1pdGVtLXNlY3Rpb24tcmVuZGVyZXJgICkKCQkJLmZvckVhY2goIGUgPT4KCQkJewoJCQkJY29uc3QgaXNfbG9uZyA9IGUucXVlcnlTZWxlY3RvciggYGJhZGdlLXNoYXBlW2FyaWEtbGFiZWwqPSJob3VycywiXWAgKQoJCQkJaWYoIGlzX2xvbmcgKQoJCQkJewoJCQkJCWUuc3R5bGUuZGlzcGxheSA9ICdub25lJwoJCQkJfQoJCQl9KQoJfQogCgljb25zdCBvYnNlcnZlciA9IG5ldyBNdXRhdGlvbk9ic2VydmVyKHJlbW92ZVVwY29taW5nVmlkZW9zKQoJb2JzZXJ2ZXIub2JzZXJ2ZSgKCQlkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGFnZS1tYW5hZ2VyJykKCQksIHsgY2hpbGRMaXN0OnRydWUsIHN1YnRyZWU6dHJ1ZSB9CgkpCgp9KSgpCg==" + }, + { + "name": "YouTube: Hide UPCOMING Videos", + "options": + { + "check_for_updates": true, + "user_modified": null, + "comment": null, + "compatopts_for_requires": true, + "compat_wrappedjsobject": false, + "compat_metadata": false, + "compat_foreach": false, + "compat_powerful_this": null, + "sandbox": null, + "noframes": null, + "unwrap": null, + "run_at": null, + "tab_types": null, + "override": + { + "use_includes": + [], + "orig_includes": + [], + "merge_includes": true, + "use_matches": + [], + "orig_matches": + [ + "https://youtube.com/*", + "https://*.youtube.com/*" + ], + "merge_matches": true, + "use_excludes": + [], + "orig_excludes": + [], + "merge_excludes": true, + "use_connects": + [], + "orig_connects": + [], + "merge_connects": true, + "use_blockers": + [], + "orig_run_at": "document-idle", + "orig_noframes": true + } + }, + "storage": + { + "ts": 1717340259739, + "data": + {} + }, + "enabled": true, + "position": 3, + "file_url": "https://source.garden/scripts/yt-hide-upcoming/raw/branch/latest/script.user.js", + "uuid": "65a91564-169a-4350-b82b-0d2e705f8794", + "source": "Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUJCVlvdVR1YmU6IEhpZGUgVVBDT01JTkcgVmlkZW9zCi8vIEBuYW1lc3BhY2UJaHR0cHM6Ly9zb3VyY2UuZ2FyZGVuCi8vIEB2ZXJzaW9uCQkxLjEKLy8gQGxpY2Vuc2UJCUNDMAovLyBAZGVzY3JpcHRpb24JSGlkZSBVUENPTUlORyB2aWRlb3Mgb24gWW91VHViZSdzIHBhZ2VzCi8vIEBhdXRob3IJCUR5bSBTb2hpbiA8cmVAZHltLnNoPgovLyBAbWF0Y2gJCWh0dHBzOi8veW91dHViZS5jb20vKgovLyBAbWF0Y2gJCWh0dHBzOi8vKi55b3V0dWJlLmNvbS8qCi8vIEBub2ZyYW1lcwovLyBAZG93bmxvYWRVUkwJaHR0cHM6Ly9zb3VyY2UuZ2FyZGVuL3NjcmlwdHMveXQtaGlkZS11cGNvbWluZy9yYXcvYnJhbmNoL2xhdGVzdC9zY3JpcHQudXNlci5qcwovLyBAdXBkYXRlVVJMCWh0dHBzOi8vc291cmNlLmdhcmRlbi9zY3JpcHRzL3l0LWhpZGUtdXBjb21pbmcvcmF3L2JyYW5jaC9sYXRlc3Qvc2NyaXB0Lm1ldGEuanMKLy8gPT0vVXNlclNjcmlwdD09CgooZnVuY3Rpb24oKSB7CgkndXNlIHN0cmljdCcKCglmdW5jdGlvbiByZW1vdmVVcGNvbWluZ1ZpZGVvcygpewoJCWRvY3VtZW50CgkJCS5xdWVyeVNlbGVjdG9yQWxsKCBgeXRkLWl0ZW0tc2VjdGlvbi1yZW5kZXJlcmAgKQoJCQkuZm9yRWFjaCggZSA9PgoJCQl7CgkJCQljb25zdCBpc191cGNvbWluZyA9IGUucXVlcnlTZWxlY3RvciggYGJhZGdlLXNoYXBlW2FyaWEtbGFiZWw9IlVwY29taW5nIl1gICkKCQkJCWlmKCBpc191cGNvbWluZyApCgkJCQl7CgkJCQkJZS5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnCgkJCQl9CgkJCX0pCgl9CgoJY29uc3Qgb2JzZXJ2ZXIgPSBuZXcgTXV0YXRpb25PYnNlcnZlcihyZW1vdmVVcGNvbWluZ1ZpZGVvcykKCW9ic2VydmVyLm9ic2VydmUoCgkJZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BhZ2UtbWFuYWdlcicpCgkJLCB7IGNoaWxkTGlzdDp0cnVlLCBzdWJ0cmVlOnRydWUgfQoJKQoKfSkoKQo=" + }, + { + "name": "YouTube: Hide LIVE Videos", + "options": + { + "check_for_updates": true, + "user_modified": null, + "comment": null, + "compatopts_for_requires": true, + "compat_wrappedjsobject": false, + "compat_metadata": false, + "compat_foreach": false, + "compat_powerful_this": null, + "sandbox": null, + "noframes": null, + "unwrap": null, + "run_at": null, + "tab_types": null, + "override": + { + "use_includes": + [], + "orig_includes": + [], + "merge_includes": true, + "use_matches": + [], + "orig_matches": + [ + "https://youtube.com/*", + "https://*.youtube.com/*" + ], + "merge_matches": true, + "use_excludes": + [], + "orig_excludes": + [], + "merge_excludes": true, + "use_connects": + [], + "orig_connects": + [], + "merge_connects": true, + "use_blockers": + [], + "orig_run_at": "document-idle", + "orig_noframes": true + } + }, + "storage": + { + "ts": 1717340433941, + "data": + {} + }, + "enabled": true, + "position": 4, + "file_url": "https://https://source.garden/scripts/yt-hide-live/raw/branch/latest/script.user.js", + "uuid": "e9c55f4e-a9f1-41f0-87e1-63a94d7e3cd2", + "source": "Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUJCVlvdVR1YmU6IEhpZGUgTElWRSBWaWRlb3MKLy8gQHZlcnNpb24JCTEuMwovLyBAbGlj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JZS5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnCgkJCQl9CgkJCX0pCgl9CgoJY29uc3Qgb2JzZXJ2ZXIgPSBuZXcgTXV0YXRpb25PYnNlcnZlcihyZW1vdmVMaXZlVmlkZW9zKQoJb2JzZXJ2ZXIub2JzZXJ2ZSgKCQlkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGFnZS1tYW5hZ2VyJykKCQksIHsgY2hpbGRMaXN0OnRydWUsIHN1YnRyZWU6dHJ1ZSB9CgkpCgp9KSgpCg==" + } + ], + "settings": + { + "statistics_enabled": true, + "configMode": 100, + "i18n": "en" + } +} diff --git a/ublock-filters.txt b/ublock-filters.txt index 8a9744f..1cdc6ff 100644 --- a/ublock-filters.txt +++ b/ublock-filters.txt @@ -1,19 +1,15 @@ +##.spaceball ##.fancybox-spaceball ##[class^='onetrust-'] ##[class^=fbc-badge] -||styles.redditmedia.com/t5_2t0no/styles/bannerBackgroundImage_ediz3eckp6441.png?width=4000&s=6f85eab69bef7aa5e1a15ee46d8215734eb0d092$image imdb.com##[data-testid="media-viewer__touch-handler"] -tiktok.com www.imdb.com##[data-testid="media-viewer__touch-handler"] www.instagram.com##._4bSq7 www.instagram.com##._9AhH0 -www.instagram.com##.GZkEI.ccgHY.NP414 -www.tiktok.com -youtube.com##.ytp-ce-element www.instagram.com##._aagw +www.instagram.com##._aagv+._aagw +www.instagram.com##.GZkEI.ccgHY.NP414 ||api.producthunt.com/widgets/$image ||zip^ -youtube.com##+js(set, yt.config_.openPopupConfig.supportedPopups.adBlockMessageViewModel, false) -youtube.com##+js(set, Object.prototype.adBlocksFound, 0) -youtube.com##+js(set, ytplayer.config.args.raw_player_response.adPlacements, []) -youtube.com##+js(set, Object.prototype.hasAllowedInstreamAd, true) +https://accounts.google.com/gsi/iframe/ +###credential_picker_container diff --git a/ublock-full.json b/ublock-full.json index 74d6171..9a26bed 100644 --- a/ublock-full.json +++ b/ublock-full.json @@ -1,9 +1,8 @@ { - "timeStamp": 1697663612170, - "version": "1.52.2", + "timeStamp": 1717998797606, + "version": "1.58.0", "userSettings": { - "importedLists": [], - "tooltipsDisabled": true + "importedLists": [] }, "selectedFilterLists": [ "user-filters", @@ -12,39 +11,51 @@ "ublock-privacy", "ublock-quick-fixes", "ublock-unbreak", - "adguard-generic", - "adguard-mobile", "easylist", - "LegitimateURLShortener", - "adguard-spyware-url", "easyprivacy", "urlhaus-1", - "curben-phishing", "plowe-0", - "easylist-chat", - "easylist-newsletters", "fanboy-cookiemonster", - "fanboy-thirdparty_social", - "ublock-annoyances", - "DEU-0", - "RUS-0" + "ublock-cookies-easylist", + "adguard-cookies", + "ublock-cookies-adguard" ], "hiddenSettings": {}, "whitelist": [ - "about-scheme", + "bitwarden.com", + "bsky.social", "chrome-extension-scheme", - "chrome-scheme", - "edge-scheme", - "metager.org", + "dashboard.twitch.tv", + "downloads.sourceforge.net", + "griddb.net", + "jobboerse.arbeitsagentur.de", + "manage-beta.fastly.com", "moz-extension-scheme", - "open.spotify.com", - "opera-scheme", - "vivaldi-scheme", - "www.webtoons.com", - "wyciwyg-scheme" + "newtab.about-scheme", + "pdfdrive.to", + "polycentric.io", + "pr0gramm.com", + "revanced.app", + "rockylinux.org", + "scsd.ch", + "surrealdb.com", + "withjuly.com", + "www.arbeitsagentur.de", + "www.daz3d.com", + "www.fastly.com", + "www.icloud.com", + "www.leanix.net", + "www.okdoomer.io", + "www.paypal.com", + "www.pixiv.net", + "www.sap.com", + "www.ssdnodes.com", + "www.strava.com", + "www.tumblr.com", + "www.youtube.com" ], "dynamicFilteringString": "behind-the-scene * * noop\nbehind-the-scene * inline-script noop\nbehind-the-scene * 1p-script noop\nbehind-the-scene * 3p-script noop\nbehind-the-scene * 3p-frame noop\nbehind-the-scene * image noop\nbehind-the-scene * 3p noop", "urlFilteringString": "", "hostnameSwitchesString": "no-large-media: behind-the-scene false\nno-csp-reports: * true", - "userFilters": "##.fancybox-spaceball\n##[class^='onetrust-']\n##[class^=fbc-badge]\n||styles.redditmedia.com/t5_2t0no/styles/bannerBackgroundImage_ediz3eckp6441.png?width=4000&s=6f85eab69bef7aa5e1a15ee46d8215734eb0d092$image\nimdb.com##[data-testid=\"media-viewer__touch-handler\"]\ntiktok.com\nwww.imdb.com##[data-testid=\"media-viewer__touch-handler\"]\nwww.instagram.com##._4bSq7\nwww.instagram.com##._9AhH0\nwww.instagram.com##.GZkEI.ccgHY.NP414\nwww.tiktok.com\nyoutube.com##.ytp-ce-element\nwww.instagram.com##._aagw\n||api.producthunt.com/widgets/$image\n||zip^\nyoutube.com##+js(set, yt.config_.openPopupConfig.supportedPopups.adBlockMessageViewModel, false)\nyoutube.com##+js(set, Object.prototype.adBlocksFound, 0)\nyoutube.com##+js(set, ytplayer.config.args.raw_player_response.adPlacements, [])\nyoutube.com##+js(set, Object.prototype.hasAllowedInstreamAd, true)\n\n! 2023-10-16 https://www.thesaurus.com\n||www.thesaurus.com/e/wp-content/themes/dictionary-com/images/ico-*$image\n" -} + "userFilters": "##.spaceball\n##.fancybox-spaceball\n##[class^='onetrust-']\n##[class^=fbc-badge]\nimdb.com##[data-testid=\"media-viewer__touch-handler\"]\nwww.imdb.com##[data-testid=\"media-viewer__touch-handler\"]\nwww.instagram.com##._4bSq7\nwww.instagram.com##._9AhH0\nwww.instagram.com##._aagw\nwww.instagram.com##._aagv+._aagw\nwww.instagram.com##.GZkEI.ccgHY.NP414\n||api.producthunt.com/widgets/$image\n||zip^\nhttps://accounts.google.com/gsi/iframe/\n###credential_picker_container" +} \ No newline at end of file diff --git a/userChrome.css b/userChrome.css new file mode 100644 index 0000000..ac4a6a2 --- /dev/null +++ b/userChrome.css @@ -0,0 +1,8 @@ +tab[muted] .tab-icon-overlay, +tab:not([muted]) .tab-icon-overlay { + display: none !important; +} +tab[muted] .tab-icon-image { + opacity: 1 !important; +} +