Skip to content

Instantly share code, notes, and snippets.

View mtripg6666tdr's full-sized avatar

うさみょん/myon2019 mtripg6666tdr

View GitHub Profile
@mtripg6666tdr
mtripg6666tdr / hide_twitter_subscribe_button.user.js
Last active May 20, 2024 04:02
Hide Twitter Subscribe Button
// ==UserScript==
// @name Hide Twitter Subscribe Button
// @namespace https://ns.usamyon.moe
// @version 0.10
// @description Hide Twitter's subscription-related UIs for those who think nothing of purchasing Twitter Premium at all.
// @author mtripg6666tdr
// @match https://twitter.com/*
// @match https://x.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
@mtripg6666tdr
mtripg6666tdr / un-ese.user.js
Last active February 15, 2023 14:50
Dive into the world that is free from ESE; remove any エセ
// ==UserScript==
// @name Un-ESE
// @namespace https://scrpg.tyanoyu.net/
// @version 0.1
// @description Dive into the world that is free from ESE
// @author mtripg6666tdr
// @match *://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=example.com
// @grant none
// ==/UserScript==
@mtripg6666tdr
mtripg6666tdr / discord_invites_sending_preventer.user.js
Last active February 12, 2023 15:28
Prevents Discord Web App from sending any invites to Discord Desktop app.
// ==UserScript==
// @name Discord Invites Sending Preventer
// @namespace https://scrpg.tyanoyu.net/
// @version 0.1
// @description Prevents Discord Web App from sending any invites to Discord Desktop app.
// @author mtripg6666tdr
// @match https://discord.com/invite/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=discord.com
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Twitter Account Name PlaceHolder
// @namespace https://scrpg.tyanoyu.net
// @version 0.2
// @description Hide twitter account name on Twitter Web App
// @author mtripg6666tdr
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @grant none
// ==/UserScript==
function findNested(_obj, _key){
const checked = [];
const result = [];
const _findNested = (obj, key, path) => {
checked.push(obj);
if (obj[key]) {
return obj;
} else {
const keys = Object.keys(obj)
for (let i = 0, len = keys.length; i < len; i++) {
const http = require("http");
const path = require("path");
const fs = require("fs");
const zlib = require("zlib");
const relativePath = "./public/";
http.createServer((req, res) => {
let loc = path.join(__dirname, "./public/", req.url);
if(fs.existsSync(loc) && fs.statSync(loc).isDirectory()) loc += "index.html";
if(fs.existsSync(loc)){
@mtripg6666tdr
mtripg6666tdr / checkDependenciesEngines.js
Last active August 23, 2022 07:37
check npm direct dependencies' package.json and list all engines field value
const packageJson = require("../package.json");
const directDeps = [...Object.keys(packageJson.dependencies), ...Object.keys(packageJson.devDependencies)];
const path = require("path");
const result = {};
for(let i = 0; i < directDeps.length; i++){
const node = require(path.join(__dirname, `../node_modules/${directDeps[i]}/package.json`)).engines?.node;
node && (result[directDeps[i]] = node);
}
@mtripg6666tdr
mtripg6666tdr / HideYouTubeRecommendations.user.js
Created October 28, 2021 13:54
Hide YouTube's recommendation culumn and stay focused on the things that you really need
// ==UserScript==
// @name Hide YouTube Recomendations
// @namespace https://scrpg.tyanoyu.net
// @version 0.1
// @description Hide YouTube's recommendation culumn and stay focused on the things that you really need
// @author mtripg6666tdr
// @match https://www.youtube.com/*
// @icon https://www.google.com/s2/favicons?domain=youtube.com
// @grant none
// ==/UserScript==
const http = require("http");
const fs = require("fs");
const path = require("path");
var number = 0;
const port = 1509;
http.createServer((req,res)=>{
if(req.method === "POST"){
const current = ++number;
console.log("[" + current + "]Received new connection");
const filename = req.headers["filename"] ?? "received.bin";
/*
Better TweetDeckのFlag MediaとReport Tweetのボタンは怖すぎるから隠しましょう。
*/
a.js-flag-media-link, a[data-action="report-tweet"] {
display: none !important;
}