Skip to content

Instantly share code, notes, and snippets.

View Yuki2718's full-sized avatar

Yuki2718

View GitHub Profile
@Yuki2718
Yuki2718 / gist:1a962af14c72aff65e907d7750f45af4
Created August 2, 2024 04:42
Test SSAP rules on Android
youtube.com##+js(set-trusted-types)
youtube.com##+js(trusted-rpnt, script, (function() {window.ytplayer=, '/*start*/(()=>{let t=document.location.href;let e=[];let n=[];let o=false;let r="";const i=Array.prototype.push;const a={apply:(t,r,a)=>{if(window.yt?.config_?.EXPERIMENT_FLAGS?.html5_enable_ssap_entity_id&&a[0]&&a[0]!==window&&typeof a[0].start=="number"&&a[0].end&&a[0].namespace==="ssap"&&a[0].id){if(!o&&a[0]?.start===0&&!n.includes(a[0].id)){e.length=0;n.length=0;o=true;i.call(e,a[0]);i.call(n,a[0].id)}if(o&&a[0]?.start!==0&&!n.includes(a[0].id)){i.call(e,a[0]);i.call(n,a[0].id)}}return Reflect.apply(t,r,a)}};window.Array.prototype.push=new Proxy(window.Array.prototype.push,a);document.addEventListener("DOMContentLoaded",(function(){if(!window.yt?.config_?.EXPERIMENT_FLAGS?.html5_enable_ssap_entity_id){return}const i=()=>{const t=document.querySelector("video");if(t&&e.length){const i=Math.round(t.duration);const a=Math.round(e.at(-1).end/1e3);const c=n.join(",");console.log(t.currentTime,r,i,a,"uBO")
@Yuki2718
Yuki2718 / gist:8764ddddf16914a5e9b06041cf78bcea
Last active August 2, 2024 16:58
プロフィールの「認証される」を消す
x.com##div[data-testid="UserName"] a[href="/i/premium_sign_up"][style]
@Yuki2718
Yuki2718 / gist:ef73304956bdf6cc898ba929a0b11bd0
Last active August 5, 2024 16:51
Brave用Ad-Shield一時対応
*$csp=script-src-attr 'none',domain=jin115.com
@Yuki2718
Yuki2718 / gist:371ea10f8952570fa23d721225134d86
Last active September 1, 2024 08:19
Shorts on Google search
google.com###rso > div div[style="height:100%"][data-hveid]:has(> .mnr-c [role="list"] [href^="https://m.youtube.com/shorts"])
www.youtube.com#@%#(()=>{let t=document.location.href,e=[],n=[],o="",r=!1;const i=Array.prototype.push,a={apply:(t,o,a)=>(window.yt?.config_?.EXPERIMENT_FLAGS?.html5_enable_ssap_entity_id&&a[0]&&a[0]!==window&&"number"==typeof a[0].start&&a[0].end&&"ssap"===a[0].namespace&&a[0].id&&(r||0!==a[0]?.start||n.includes(a[0].id)||(e.length=0,n.length=0,r=!0,i.call(e,a[0]),i.call(n,a[0].id)),r&&0!==a[0]?.start&&!n.includes(a[0].id)&&(i.call(e,a[0]),i.call(n,a[0].id))),Reflect.apply(t,o,a))};window.Array.prototype.push=new Proxy(window.Array.prototype.push,a),AG_onLoad((function(){if(!window.yt?.config_?.EXPERIMENT_FLAGS?.html5_enable_ssap_entity_id)return;const i=()=>{const t=document.querySelector("video");if(t&&e.length){const i=Math.round(t.duration),a=Math.round(e.at(-1).end/1e3),c=n.join(",");if(!1===t.loop&&o!==c&&i&&i===a){const n=e.at(-1).start/1e3;t.currentTime<n&&(t.currentTime=n,r=!1,o=c)}else if(!0===t.loop&&i&&i===a){const n=e.at(-1).start/1e3;t.currentTime<n&&(t.currentTime=n,r=!1,o=c)}}};i();new Mutati
@Yuki2718
Yuki2718 / gist:a9cc4c34fde97014e98d124a2cefb07f
Created October 3, 2024 12:33
アナリティクスを利用する
x.com##div[data-testid="analytics-preview"]
x.com##div[aria-label="タイムライン: ホームタイムライン"] > div > div[style^="transform"]:has(div[data-testid="inlinePrompt"] a[href="/i/radar"])
! より汎用的なルール(誤爆リスクあり、先頭の!を外して有効化)
!x.com##div[aria-label="タイムライン: ホームタイムライン"] > div > div[style^="transform"]:has(div[data-testid="inlinePrompt"])
@Yuki2718
Yuki2718 / gist:6b8fe5e45897fe261209e556a1dc0c07
Last active November 26, 2024 17:12
Google 関連する質問
www.google.com###res div > div[class] > div:has(> [data-initq][jsdata] > [class] > div[id][data-bs])
www.google.com###res div > div[class] > div[class]:has(+ div:not([class]) > [data-initq][jsdata] > [class] > div[id][data-bs])
@Yuki2718
Yuki2718 / gist:13bec2601f651d6fcccd56f9cdf80c60
Created December 17, 2024 05:08
AS 意図的に検知を起こさせるルール
##span[id^="img_"][class^="img_"] > div[style*="justify-content:"][style*="align-items:"][style*="relative;"][style*="center"] > iframe[src][marginwidth][width][style]
@Yuki2718
Yuki2718 / gist:aba9a83cb4e45f7d89337b3a6f9f726a
Last active December 18, 2024 16:46
AS テストルール
jin115.com,blog.livedoor.jp,itainews.com#%#//scriptlet('abort-current-inline-script', 'Object.getPrototypeOf', 'html-load.com')
jin115.com,blog.livedoor.jp,itainews.com#%#//scriptlet('abort-on-stack-trace', 'addEventListener', 'html-load.com')