Greasy Fork is available in English.

Обсуждения » Обсуждение сайта Greasy Fork

How to add your script to Greasy Fork?

How to add your script to Greasy Fork?

How to add your script to Greasy Fork?

Follow these instructions:

#1: Press on this link to go to your profile:

#2: Press on: Publish a script you’ve written

#3: Verify your account. (If needed)

#4: Put your code in, add a description and publish! :)


If you need a starter template for your code, use this:

// ==UserScript==
// @name         Put your script name here.
// @description  Put your description here.
// @version      1.0

// @author       Put your name here.
// @match        *://*/*
// @run-at       document-start
// @license      N/A

// @namespace    https://google.com/
// @icon         https://www.google.com/favicon.ico

// @grant        GM_info
// @grant        GM_getValue
// @grant        GM_setValue
// @grant        GM_deleteValue
// @grant        GM_xmlhttpRequest
// @grant        GM_registerMenuCommand
// @grant        GM_openInTab
// @grant        GM_notification
// @grant        GM_addStyle
// @grant        GM_log
// @grant        GM_getResourceText
// @grant        GM_getResourceURL
// @grant        GM_listValues
// @grant        GM_addValueChangeListener
// @grant        GM_removeValueChangeListener
// @grant        GM_setClipboard
// @grant        GM_getTab
// @grant        GM_saveTab
// @grant        GM_getTabs
// @grant        GM_download
// @grant        GM_getResourceURL
// @grant        GM_getResourceText
// ==/UserScript==

/*
    Author: Put your name here.
    Github: Put your GitHub repository URL or GitHub user page here.
    Discord: Put your discord server support URL or your discord username here. 
    Greasyfork: Put your Greasyfork profile page URL here.
    Ko-fi: Put your ko-fi donation URL here.
    Website: Put your website URL here. (One you own or made.)
*/

(function() {
    "use strict";

    const log = console.log;
// Your code goes here.
})();

// ==UserScript==
// @name Block element
// @namespace Block element
// @description Chặn quảng cáo web phim
// @version 0.1
// @description *
// @author *
// @match *://*.*.*/*
// @grant none
// ==/UserScript==
const injectCSS = css => {
let el = document.createElement('style');
el.type = 'text/css';
el.innerText = css;
document.head.appendChild(el);
return el;
};
injectCSS('#headerpcads, #catfishs_content, #hidemobile, #pm_quangcao, #an_catfish, #topplayerads, #overlay, .overlay_content, .banner-flex, #top_addd, .ads, #ads, #xs-addd0, .popUpBannerBox, #catfish{display: none!important}');

Ответить

Войдите, чтобы ответить.