GC - Neggsweeper better flagging

Makes flagging easier

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         GC - Neggsweeper better flagging
// @namespace    http://tampermonkey.net/
// @version      1.1.6
// @description  Makes flagging easier
// @author       wibreth
// @match        https://www.grundos.cafe/games/neggsweeper*
// @match        https://grundos.cafe/games/neggsweeper*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=grundos.cafe
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_addStyle
// ==/UserScript==

(function() {
	'use strict';
	GM_addStyle(`
	.flagging img[src="https://grundoscafe.b-cdn.net/games/php_games/neggsweeper/negg.gif"]:hover {
		 content: url("https://grundoscafe.b-cdn.net/games/php_games/neggsweeper/flagnegg.gif")
	}
	#container {
    grid-template-areas:
        'top top aio'
        'side banner aio'
        'side content aio'
        'side event aio'
        'side footer aio';
    grid-template-rows: 44px 72px min-content min-content minmax(0,1fr);
	}
    #page_content {
    margin-top: 16.5px;
    }
    main > p.center:not(.medfont) {
    position: absolute;
    background: var(--bgcolor);
    top: 117px;
    right: 735px;
}`);


	$('#flag_it').on('change', () => {
		let flag = $('#flag_it').prop('checked');
		if (persistent)
			GM_setValue('flag', flag);

		if(flag) {
            $('#neggsweeper_grid').addClass('flagging');
            return;
		}
		$('#neggsweeper_grid').removeClass('flagging');
	});


	$('.bonus_negg').insertAfter('#neggsweeper_grid');

	$(document).keydown(function(e) {
        if (e.which == 88) //x
            $('#flag_it').click();
        if (e.which == 69) //e
            $('input.ns_start:nth-child(3)').click();
        if (e.which == 77) //m
            $('input.ns_start:nth-child(4)').click();
        if (e.which == 72) //h
            $('input.ns_start:nth-child(5)').click();
	});

})();