[GC | Library] - SSW: Savvy Shop Wiz

Library to call.

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

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

// ==UserScript==
// @name        [GC | Library] - SSW: Savvy Shop Wiz
// @namespace   https://gf.qytechs.cn/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');
          ManualAdd.textContent = 'Add User Manually';
	  ManualAdd.id = 'menubutton';
          $(ManualAdd).on('click', addUsersManually);
	  SSWMenu.appendChild(ManualAdd);




    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;
};

function addUsersManually() {
    var userInput = prompt('Who would you like to add to your list? This is CASE SENSITIVE! Enter one username then click OK. When you are done adding, click cancel.');

    if (userInput !== null && userInput.trim() !== '') {
        friendList.push(userInput.trim());
        GM_setValue('friendList', friendList);
        console.log('Added', userInput.trim(), 'to the friend list.');

if (window.location.href === 'https://www.grundos.cafe/market/wizard/') {
    if (confirm('Do you want to reload the page to see the updated results?')) {
        location.reload();
    }
}

} else {
        console.log('No username entered. Operation canceled.');
    }
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址