Sample Userscript Greasy Fork Full

Userscript mẫu đầy đủ metadata, hợp lệ tuyệt đối khi đăng Greasy Fork

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Sample Userscript Greasy Fork Full
// @namespace    https://greasyfork.org/users/ahi/sample-userscript-full
// @version      1.0.0
// @description  Userscript mẫu đầy đủ metadata, hợp lệ tuyệt đối khi đăng Greasy Fork
// @author       Ahi
// @match        *://*/*
// @license      MIT
// @grant        none
// @run-at       document-end
// ==/UserScript==

(function () {
    'use strict';

    // Code JavaScript thực thi hợp lệ
    console.log('✅ Userscript Greasy Fork đang chạy');

    // Ví dụ thao tác DOM
    const banner = document.createElement('div');
    banner.textContent = 'Userscript hoạt động';
    banner.style.position = 'fixed';
    banner.style.top = '10px';
    banner.style.right = '10px';
    banner.style.background = '#222';
    banner.style.color = '#fff';
    banner.style.padding = '8px 12px';
    banner.style.borderRadius = '6px';
    banner.style.fontSize = '12px';
    banner.style.zIndex = '99999';

    document.body.appendChild(banner);
})();