// ==UserScript== // @name Cookie Editor // @namespace http://tampermonkey.net/ // @version 0.1 // @description サイト内のCookieを編集できるようになるスクリプトです。 // @author You // @match *.x-feeder.info/*/ // @match *.x-feeder.info/*/sp/ // @exclude *.x-feeder.info/*/settings/** // @match http://drrrkari.com/room/ // @match http://www.3751chat.com/ChatRoom* // @match https://pictsense.com/* // @match http://www.himachat.com/ // @match https://discord.com/* // @match https://*.open2ch.net/* // @require https://greasyfork.org/scripts/396472-yaju1919/code/yaju1919.js?version=798050 // @require https://greasyfork.org/scripts/388005-managed-extensions/code/Managed_Extensions.js?version=720959 // @grant GM.setValue // @grant GM.getValue // @downloadURL none // ==/UserScript== (function() { 'use strict'; // カスタマイズ領域 const cookieInfoColor = "lightyellow"; // Cookie情報の色 //----------------- // Cookieをセットする関数。「feederチャット - sidを変える」(https://greasyfork.org/ja/scripts/402949)というスクリプトからお借りしました。 function setCookie(c_name, value, expiredays) { // pathの指定 var path = location.pathname; // pathをフォルダ毎に指定する場合のIE対策 var paths = new Array(); paths = path.split("/"); if (paths[paths.length - 1] != "") { paths[paths.length - 1] = ""; path = paths.join("/"); } // 有効期限の日付 var extime = new Date().getTime(); var cltime = new Date(extime + (60 * 60 * 24 * 1000 * expiredays)); var exdate = cltime.toUTCString(); // クッキーに保存する文字列を生成 var s = ""; s += c_name + "=" + encodeURIComponent(value); // 値はエンコードしておく s += "; path=" + path; if (expiredays) { s += "; expires=" + exdate + "; "; } else { s += "; "; } // クッキーに保存 document.cookie = s; } //--------------------------------------------------------------------------------------------------------------------------------------- const addBtn = (h, title, func) => { // ボタンを追加する関数 return $("