Skip to content

Instantly share code, notes, and snippets.

View hidao80's full-sized avatar

hidao hidao80

View GitHub Profile
@hidao80
hidao80 / pip-jammer-canceller-bookmarklet.js
Last active September 5, 2023 10:19
Bookmarklet to remove the disablepictureinpicture attribute from all video tags in a page.
javascript:(()%3D%3E%7B%5B...document.querySelectorAll(%22video%22)%5D.map((e%3D%3Ee.removeAttribute(%22disablepictureinpicture%22)))%3B%7D)()
@hidao80
hidao80 / CompressPhoneNumbers.js
Created August 9, 2023 23:04
Simple phone number compression/decompression functions.
/**
* Compress strings that require only numbers, such as phone numbers.
*
* @param {string} num Requiring only numbers.
* @param {string} code String of symbols used for compression.
* @return {string} Compressed string
*/
function numCps(
num,
code = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
@hidao80
hidao80 / Chocolatey
Last active August 6, 2023 23:44
Chocolatey packages install command
cinst -y googlechrome git 7zip visualstudiocode vlc libreoffice winscp brave `
composer gimp InkScape pandoc dbeaver pdfxchangeeditor microsoft-windows-terminal `
ultravnc virtualbox vagrant veracrypt winmerge xmind zoom Screenpresso `
advanced-ip-scanner win32diskimager scansnapmanager jre8 wsl2 wget `
googlejapaneseinput bonjour eartrumpet cpu-z ffmpeg crystaldiskmark `
vcredist-all microsoft-build-tools microsoft-windows-terminal python python3 `
nodejs mkcert obs openssl php insomnia-rest-api-client powerautomatedesktop curl `
barrier doxygen.install graphviz ferdium
@hidao80
hidao80 / PageTransferMonitoring.bookmarklet.js
Created July 26, 2023 11:15
Pixiv のページ切替時に同じ処理を繰り返すブックマークレット
javascript:new MutationObserver((()=>{const i=document.querySelector("#root>div>div>div:nth-child(4)>div>div>div>main>section>div>div>figure>div>div>div>div>img");i&&(i.style.filter="blur(4px)")})).observe(document.getElementById("root"),{subtree:!0,childList:!0});
@hidao80
hidao80 / simple-preview-modal.js
Last active September 2, 2024 12:17
Script that will open an image preview dialog by loading and specifying a class for the target tag.
/**
* Usage: Add the class name "hd simple-preview-modal" to the image tag.
* If you want to load a different image from the src attribute, add the data-preview-src attribute.
* <img src="..." class="hd simple-preview-modal" data-preview-src="...">
*
* Copyright (c) 2023 hidao80
* Released under the MIT license
* https://opensource.org/licenses/mit-license.php
*/
(() => {
@hidao80
hidao80 / FediverseTextBlur.bookmarklet.js
Last active March 9, 2023 22:13
Blur text in Misskey v11 and Mastodon.
javascript:(()%3D%3E%7Bconst%20KEY%3D%22FediverseTextBlur_bookmarklet_cssRules_indexes%22%2Cstyles%3D%5B%22article%20.havbbuyv%2C%5Cnarticle%20.status__content%2C%5Cnarticle%20.display-name%20%7B%5Cnfilter%3A%20blur(5px)%3B%5Cn%7D%22%5D%3Blet%20indexes%3DJSON.parse(localStorage.getItem(KEY)%7C%7C%22%5B%5D%22)%3Bconst%20usableSheet%3D%5B...document.styleSheets%5D.slice(-1)%5B0%5D%3Bif(indexes.length%3E0)%7Bfor(const%20e%20of%20indexes)usableSheet.deleteRule(e)%3BlocalStorage.setItem(KEY%2C%22%5B%5D%22)%7Delse%7Bconst%20e%3DusableSheet.cssRules.length%3Bfor(let%20s%20of%20styles)indexes.push(e)%2CusableSheet.insertRule(s%2Ce)%3BlocalStorage.setItem(KEY%2CJSON.stringify(indexes))%7D%7D)()
@hidao80
hidao80 / MisskeyV11InvisibleProfile.bookmarklet.js
Last active February 23, 2023 08:33
消えないプロフィール列 for Misskey.dev
(()=>{const username=JSON.parse(localStorage.getItem("vuex")).i.username,a=document.querySelector(`a[title=${username}]`);a.click(),setTimeout(()=>{const main=document.querySelector("#app > div.content > div"),profile=document.querySelector("div[data-v-2e1e50f0].dnpfarvgbnfmyzbdquhhzyxcmstpdqzs");let div=profile.cloneNode(!0);div.querySelector("button.close").onclick=e=>e.target.parentNode.parentNode.remove(),main.insertBefore(div,document.querySelector("#app > div.content > div > button")),setTimeout(()=>{profile.querySelector("button.close").click()},500)},500)})();
@hidao80
hidao80 / FediversTextBlur.stylus.css
Last active January 9, 2023 04:38
Mastodon/Misskey text blur style
/* ==UserStyle==
@name FediversTextBlur
@namespace github.com/hidao80/stylus
@version 1.1.3
@description Mastodon/Misskey text blur style
@author hidao80
@homepageURL https://gist.github.com/hidao80/f3766691d16c4a8e8644b37d01754ce0
@updateURL https://gist.githubusercontent.com/hidao80/f3766691d16c4a8e8644b37d01754ce0/raw/e088585c03694db3964dcf9ce0b1c658f512ab85/FediversTextBlur.stylus.css
@license MIT
==/UserStyle== */
@hidao80
hidao80 / Misskey-v11_RssReaderLikeDeck.css
Created December 5, 2022 14:49
This css changes the deck layout of Misskey v11 to an RSS reader-like layout.
article div.main {
display: flex;
}
article div.body {
margin-left: 0.5rem;
margin-right: auto;
}
article div.text p, article div.text span, article div.text br {
content: attr(text);
}
@hidao80
hidao80 / Right-click-jammer-canceller.bookmarklet.js
Last active September 5, 2023 09:46
Bookmarklet to enable context menus on web pages that do not allow right-clicking.
javascript:(()%3D%3E%7B!function()%7Bfor(const%20o%20of%5Bdocument%2Cdocument.body%5D)o.addEventListener(%22contextmenu%22%2C(o%3D%3E%7Bo.stopImmediatePropagation()%7D)%2C!0)%7D()%3B%7D)()