Skip to content

Commit

Permalink
Deploying to master from @ violentmonkey/violentmonkey-astro@0bb4eaa 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
gera2ld committed Jan 12, 2025
1 parent aa13379 commit 9b033cb
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion beta/api/gm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

gtag('config', 'G-2E0X3LSCBM');
</script><link rel="stylesheet" href="/beta/_astro/_path_.C8RZEqKB.css"><script>!(function(w,p,f,c){if(!window.crossOriginIsolated && !navigator.serviceWorker) return;c=w[p]=Object.assign(w[p]||{},{"lib":"/beta/~partytown/","debug":false});c[f]=(c[f]||[]).concat(["dataLayer.push"])})(window,'partytown','forward');/* Partytown 0.11.0 - MIT QwikDev */
const t={preserveBehavior:!1},e=e=>{if("string"==typeof e)return[e,t];const[n,r=t]=e;return[n,{...t,...r}]},n=Object.freeze((t=>{const e=new Set;let n=[];do{Object.getOwnPropertyNames(n).forEach((t=>{"function"==typeof n[t]&&e.add(t)}))}while((n=Object.getPrototypeOf(n))!==Object.prototype);return Array.from(e)})());!function(t,r,o,i,a,s,c,l,d,p,u=t,f){function h(){f||(f=1,"/"==(c=(s.lib||"/~partytown/")+(s.debug?"debug/":""))[0]&&(d=r.querySelectorAll('script[type="text/partytown"]'),i!=t?i.dispatchEvent(new CustomEvent("pt1",{detail:t})):(l=setTimeout(v,(null==s?void 0:s.fallbackTimeout)||1e4),r.addEventListener("pt0",w),a?y(1):o.serviceWorker?o.serviceWorker.register(c+(s.swPath||"partytown-sw.js"),{scope:c}).then((function(t){t.active?y():t.installing&&t.installing.addEventListener("statechange",(function(t){"activated"==t.target.state&&y()}))}),console.error):v())))}function y(e){p=r.createElement(e?"script":"iframe"),t._pttab=Date.now(),e||(p.style.display="block",p.style.width="0",p.style.height="0",p.style.border="0",p.style.visibility="hidden",p.setAttribute("aria-hidden",!0)),p.src=c+"partytown-"+(e?"atomics.js?v=0.11.0":"sandbox-sw.html?"+t._pttab),r.querySelector(s.sandboxParent||"body").appendChild(p)}function v(n,o){for(w(),i==t&&(s.forward||[]).map((function(n){const[r]=e(n);delete t[r.split(".")[0]]})),n=0;n<d.length;n++)(o=r.createElement("script")).innerHTML=d[n].innerHTML,o.nonce=s.nonce,r.head.appendChild(o);p&&p.parentNode.removeChild(p)}function w(){clearTimeout(l)}s=t.partytown||{},i==t&&(s.forward||[]).map((function(r){const[o,{preserveBehavior:i}]=e(r);u=t,o.split(".").map((function(e,r,o){var a;u=u[o[r]]=r+1<o.length?u[o[r]]||(a=o[r+1],n.includes(a)?[]:{}):(()=>{let e=null;if(i){const{methodOrProperty:n,thisObject:r}=((t,e)=>{let n=t;for(let t=0;t<e.length-1;t+=1)n=n[e[t]];return{thisObject:n,methodOrProperty:e.length>0?n[e[e.length-1]]:void 0}})(t,o);"function"==typeof n&&(e=(...t)=>n.apply(r,...t))}return function(){let n;return e&&(n=e(arguments)),(t._ptf=t._ptf||[]).push(o,arguments),n}})()}))})),"complete"==r.readyState?h():(t.addEventListener("DOMContentLoaded",h),t.addEventListener("load",h))}(window,document,navigator,top,window.crossOriginIsolated);;(e=>{e.addEventListener("astro:before-swap",e=>{let r=document.body.querySelector("iframe[src*='/beta/~partytown/']");if(r)e.newDocument.body.append(r)})})(document);</script></head> <body> <header class="sticky top-0 left-0 right-0 bg-white z-10"> <nav> <a href="/beta/" class="nav-icon sm:hidden"> <svg viewBox="0 0 24 24"> <path d="M12 0l-12 12h4v12h5v-8h6v8h5v-12h4z"></path> </svg> </a> <button class="nav-icon lg:hidden" data-sidebar-toggle> <svg viewBox="0 0 24 24"> <path d="M0 4h24v2h-24zm0 8h24v2h-24zm0 8h24v2h-24z"></path> </svg> </button> <a href="/beta/" class="brand hidden sm:block"> Violentmonkey </a> <span class="flex-1"></span> <div class="overflow-auto min-w-0 flex whitespace-no-wrap"> <a class="nav-item " href="/beta/get-it/"> Get it </a><a class="nav-item " href="/beta/guide/"> Guide </a><a class="nav-item active" href="/beta/api/"> API </a><a class="nav-item " href="/beta/faq/"> FAQ </a><a class="nav-item " href="/beta/posts/"> Blog </a> </div> </nav> <div class="w-full h-px"> <div class="w-full h-full origin-left bg-yellow-500 scale-x-0" data-scroll-indicator></div> </div> <script type="module" src="/beta/_astro/ScrollIndicator.astro_astro_type_script_index_0_lang.BE6eNtcK.js"></script> </header> <script type="module">document.querySelector("[data-sidebar-toggle]")?.addEventListener("click",()=>{document.body.classList.toggle("sidebar-open")});</script> <div class="relative z-0"> <main class="has-sidebar"> <div class="sidebar-wrapper"> <aside class="sidebar"> <ul> <li> <a href="/beta/api/gm/" class="active"> Privileged APIs </a> </li><li> <a href="/beta/api/metadata-block/" class> Metadata Block </a> </li><li> <a href="/beta/api/matching/" class> Matching </a> </li> </ul> </aside> </div> <script type="module">const t=document.querySelector("aside.sidebar");t?.addEventListener("click",e=>{e.stopPropagation()});t?.parentNode?.addEventListener("click",e=>{t?.contains(e.target)||document.body.classList.remove("sidebar-open")});</script> <h1 class="grid-col-start-2 mt-0 pt-8">Privileged APIs</h1> <div class="toc grid-col-start-3 grid-row-start-2"><ul><li style="--toc-depth:0"><a href="#unsafewindow">unsafeWindow</a></li><li style="--toc-depth:0"><a href="#gm_">GM_*</a></li><li style="--toc-depth:1"><a href="#gm_info">GM_info</a></li><li style="--toc-depth:1"><a href="#gm_getvalue">GM_getValue</a></li><li style="--toc-depth:1"><a href="#gm_getvalues">GM_getValues</a></li><li style="--toc-depth:1"><a href="#gm_setvalue">GM_setValue</a></li><li style="--toc-depth:1"><a href="#gm_setvalues">GM_setValues</a></li><li style="--toc-depth:1"><a href="#gm_deletevalue">GM_deleteValue</a></li><li style="--toc-depth:1"><a href="#gm_deletevalues">GM_deleteValues</a></li><li style="--toc-depth:1"><a href="#gm_listvalues">GM_listValues</a></li><li style="--toc-depth:1"><a href="#gm_addvaluechangelistener">GM_addValueChangeListener</a></li><li style="--toc-depth:1"><a href="#gm_removevaluechangelistener">GM_removeValueChangeListener</a></li><li style="--toc-depth:1"><a href="#gm_getresourcetext">GM_getResourceText</a></li><li style="--toc-depth:1"><a href="#gm_getresourceurl">GM_getResourceURL</a></li><li style="--toc-depth:1"><a href="#gm_addelement">GM_addElement</a></li><li style="--toc-depth:1"><a href="#gm_addstyle">GM_addStyle</a></li><li style="--toc-depth:1"><a href="#gm_openintab">GM_openInTab</a></li><li style="--toc-depth:1"><a href="#gm_registermenucommand">GM_registerMenuCommand</a></li><li style="--toc-depth:1"><a href="#gm_unregistermenucommand">GM_unregisterMenuCommand</a></li><li style="--toc-depth:1"><a href="#gm_notification">GM_notification</a></li><li style="--toc-depth:1"><a href="#gm_setclipboard">GM_setClipboard</a></li><li style="--toc-depth:1"><a href="#gm_xmlhttprequest">GM_xmlhttpRequest</a></li><li style="--toc-depth:1"><a href="#gm_download">GM_download</a></li><li style="--toc-depth:0"><a href="#gm">GM.*</a></li></ul><hr class="lg:hidden"></div><script type="module" src="/beta/_astro/ToC.astro_astro_type_script_index_0_lang.Cc0lKERm.js"></script> <section class="grid-col-start-2"> <article class="flex-1 min-w-0"> <p>Violentmonkey APIs are derived from those in Greasemonkey v3, and most of them work the same way, <code>GM.*</code> <a href="https://wiki.greasespot.net/Greasemonkey_Manual:API">Greasemonkey v4-compatible</a> aliases were added in VM2.12.0.</p>
const t={preserveBehavior:!1},e=e=>{if("string"==typeof e)return[e,t];const[n,r=t]=e;return[n,{...t,...r}]},n=Object.freeze((t=>{const e=new Set;let n=[];do{Object.getOwnPropertyNames(n).forEach((t=>{"function"==typeof n[t]&&e.add(t)}))}while((n=Object.getPrototypeOf(n))!==Object.prototype);return Array.from(e)})());!function(t,r,o,i,a,s,c,l,d,p,u=t,f){function h(){f||(f=1,"/"==(c=(s.lib||"/~partytown/")+(s.debug?"debug/":""))[0]&&(d=r.querySelectorAll('script[type="text/partytown"]'),i!=t?i.dispatchEvent(new CustomEvent("pt1",{detail:t})):(l=setTimeout(v,(null==s?void 0:s.fallbackTimeout)||1e4),r.addEventListener("pt0",w),a?y(1):o.serviceWorker?o.serviceWorker.register(c+(s.swPath||"partytown-sw.js"),{scope:c}).then((function(t){t.active?y():t.installing&&t.installing.addEventListener("statechange",(function(t){"activated"==t.target.state&&y()}))}),console.error):v())))}function y(e){p=r.createElement(e?"script":"iframe"),t._pttab=Date.now(),e||(p.style.display="block",p.style.width="0",p.style.height="0",p.style.border="0",p.style.visibility="hidden",p.setAttribute("aria-hidden",!0)),p.src=c+"partytown-"+(e?"atomics.js?v=0.11.0":"sandbox-sw.html?"+t._pttab),r.querySelector(s.sandboxParent||"body").appendChild(p)}function v(n,o){for(w(),i==t&&(s.forward||[]).map((function(n){const[r]=e(n);delete t[r.split(".")[0]]})),n=0;n<d.length;n++)(o=r.createElement("script")).innerHTML=d[n].innerHTML,o.nonce=s.nonce,r.head.appendChild(o);p&&p.parentNode.removeChild(p)}function w(){clearTimeout(l)}s=t.partytown||{},i==t&&(s.forward||[]).map((function(r){const[o,{preserveBehavior:i}]=e(r);u=t,o.split(".").map((function(e,r,o){var a;u=u[o[r]]=r+1<o.length?u[o[r]]||(a=o[r+1],n.includes(a)?[]:{}):(()=>{let e=null;if(i){const{methodOrProperty:n,thisObject:r}=((t,e)=>{let n=t;for(let t=0;t<e.length-1;t+=1)n=n[e[t]];return{thisObject:n,methodOrProperty:e.length>0?n[e[e.length-1]]:void 0}})(t,o);"function"==typeof n&&(e=(...t)=>n.apply(r,...t))}return function(){let n;return e&&(n=e(arguments)),(t._ptf=t._ptf||[]).push(o,arguments),n}})()}))})),"complete"==r.readyState?h():(t.addEventListener("DOMContentLoaded",h),t.addEventListener("load",h))}(window,document,navigator,top,window.crossOriginIsolated);;(e=>{e.addEventListener("astro:before-swap",e=>{let r=document.body.querySelector("iframe[src*='/beta/~partytown/']");if(r)e.newDocument.body.append(r)})})(document);</script></head> <body> <header class="sticky top-0 left-0 right-0 bg-white z-10"> <nav> <a href="/beta/" class="nav-icon sm:hidden"> <svg viewBox="0 0 24 24"> <path d="M12 0l-12 12h4v12h5v-8h6v8h5v-12h4z"></path> </svg> </a> <button class="nav-icon lg:hidden" data-sidebar-toggle> <svg viewBox="0 0 24 24"> <path d="M0 4h24v2h-24zm0 8h24v2h-24zm0 8h24v2h-24z"></path> </svg> </button> <a href="/beta/" class="brand hidden sm:block"> Violentmonkey </a> <span class="flex-1"></span> <div class="overflow-auto min-w-0 flex whitespace-no-wrap"> <a class="nav-item " href="/beta/get-it/"> Get it </a><a class="nav-item " href="/beta/guide/creating-a-userscript/"> Guide </a><a class="nav-item active" href="/beta/api/gm/"> API </a><a class="nav-item " href="/beta/faq/"> FAQ </a><a class="nav-item " href="/beta/posts/"> Blog </a> </div> </nav> <div class="w-full h-px"> <div class="w-full h-full origin-left bg-yellow-500 scale-x-0" data-scroll-indicator></div> </div> <script type="module" src="/beta/_astro/ScrollIndicator.astro_astro_type_script_index_0_lang.BE6eNtcK.js"></script> </header> <script type="module">document.querySelector("[data-sidebar-toggle]")?.addEventListener("click",()=>{document.body.classList.toggle("sidebar-open")});</script> <div class="relative z-0"> <main class="has-sidebar"> <div class="sidebar-wrapper"> <aside class="sidebar"> <ul> <li> <a href="/beta/api/gm/" class="active"> Privileged APIs </a> </li><li> <a href="/beta/api/metadata-block/" class> Metadata Block </a> </li><li> <a href="/beta/api/matching/" class> Matching </a> </li> </ul> </aside> </div> <script type="module">const t=document.querySelector("aside.sidebar");t?.addEventListener("click",e=>{e.stopPropagation()});t?.parentNode?.addEventListener("click",e=>{t?.contains(e.target)||document.body.classList.remove("sidebar-open")});</script> <h1 class="grid-col-start-2 mt-0 pt-8">Privileged APIs</h1> <div class="toc grid-col-start-3 grid-row-start-2"><ul><li style="--toc-depth:0"><a href="#unsafewindow">unsafeWindow</a></li><li style="--toc-depth:0"><a href="#gm_">GM_*</a></li><li style="--toc-depth:1"><a href="#gm_info">GM_info</a></li><li style="--toc-depth:1"><a href="#gm_getvalue">GM_getValue</a></li><li style="--toc-depth:1"><a href="#gm_getvalues">GM_getValues</a></li><li style="--toc-depth:1"><a href="#gm_setvalue">GM_setValue</a></li><li style="--toc-depth:1"><a href="#gm_setvalues">GM_setValues</a></li><li style="--toc-depth:1"><a href="#gm_deletevalue">GM_deleteValue</a></li><li style="--toc-depth:1"><a href="#gm_deletevalues">GM_deleteValues</a></li><li style="--toc-depth:1"><a href="#gm_listvalues">GM_listValues</a></li><li style="--toc-depth:1"><a href="#gm_addvaluechangelistener">GM_addValueChangeListener</a></li><li style="--toc-depth:1"><a href="#gm_removevaluechangelistener">GM_removeValueChangeListener</a></li><li style="--toc-depth:1"><a href="#gm_getresourcetext">GM_getResourceText</a></li><li style="--toc-depth:1"><a href="#gm_getresourceurl">GM_getResourceURL</a></li><li style="--toc-depth:1"><a href="#gm_addelement">GM_addElement</a></li><li style="--toc-depth:1"><a href="#gm_addstyle">GM_addStyle</a></li><li style="--toc-depth:1"><a href="#gm_openintab">GM_openInTab</a></li><li style="--toc-depth:1"><a href="#gm_registermenucommand">GM_registerMenuCommand</a></li><li style="--toc-depth:1"><a href="#gm_unregistermenucommand">GM_unregisterMenuCommand</a></li><li style="--toc-depth:1"><a href="#gm_notification">GM_notification</a></li><li style="--toc-depth:1"><a href="#gm_setclipboard">GM_setClipboard</a></li><li style="--toc-depth:1"><a href="#gm_xmlhttprequest">GM_xmlhttpRequest</a></li><li style="--toc-depth:1"><a href="#gm_download">GM_download</a></li><li style="--toc-depth:0"><a href="#gm">GM.*</a></li></ul><hr class="lg:hidden"></div><script type="module" src="/beta/_astro/ToC.astro_astro_type_script_index_0_lang.Cc0lKERm.js"></script> <section class="grid-col-start-2"> <article class="flex-1 min-w-0"> <p>Violentmonkey APIs are derived from those in Greasemonkey v3, and most of them work the same way, <code>GM.*</code> <a href="https://wiki.greasespot.net/Greasemonkey_Manual:API">Greasemonkey v4-compatible</a> aliases were added in VM2.12.0.</p>
<h2 id="unsafewindow">unsafeWindow</h2>
<p><code>unsafeWindow</code> is the actual <code>window</code> object of the page.</p>
<p>It is useful when <a href="/api/metadata-block/#grant"><code>@grant</code></a> is declared with anything other than <code>none</code>.</p>
Expand Down
Loading

0 comments on commit 9b033cb

Please sign in to comment.