Greasy Fork

[GC | Library] - SSW: Savvy Shop Wiz

Library to call.

目前为 2024-02-15 提交的版本。查看 最新版本

此脚本不应直接安装,它是一个供其他脚本使用的外部库。如果您需要使用该库,请在脚本元属性加入:// @require https://update.greasyfork.cloud/scripts/487361/1327685/%5BGC%20%7C%20Library%5D%20-%20SSW%3A%20Savvy%20Shop%20Wiz.js

// ==UserScript==
// @name        [GC | Library] - SSW: Savvy Shop Wiz
// @namespace   https://greasyfork.org/en/users/1225524-kaitlin
// @require	https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @grant	GM_getValue
// @grant	GM_setValue
// @grant	GM_listValues
// @grant	GM_addStyle
// @license     MIT
// @version     1.0
// @author      Cupkait
// @icon        https://i.imgur.com/4Hm2e6z.png
// @description		Library to call.
// ==/UserScript==


    const SSWMenuContainer = document.createElement('div');
	  SSWMenuContainer.id = 'sswcontainer';


    const SSWButton = document.createElement('button');
    SSWButton.textContent = 'SSW Settings';
		SSWButton.id = 'sswsettings';


    const SSWMenu = document.createElement('div');
		SSWMenu.id = 'sswmenu';

    const ManualAdd = document.createElement('button');
		const ManualRemove = document.createElement('button');
		const SyncFriends = document.createElement('button');
		const SyncBlocked = document.createElement('button');
		const SyncGuild = document.createElement('button');

function createSSWMenu() {

    SSWMenuContainer.appendChild(SSWButton);
    SSWMenuContainer.appendChild(SSWMenu);
    $('#sb_edge').append(SSWMenuContainer);

    $(SSWButton).on('click', function() {
        $(SSWMenu).fadeToggle(150);
    });

    return SSWMenuContainer;
		return SSWMenu;
};