Skip to content

Instantly share code, notes, and snippets.

View mimonelu's full-sized avatar
💭
🍣

mimonelu mimonelu

💭
🍣
View GitHub Profile
@mimonelu
mimonelu / bluecast-profile-link.js
Created May 5, 2024 04:27
Bluecast Profile Link
@mimonelu
mimonelu / gist:a08f1aeab49dc760a14a43047473643b
Created March 8, 2023 15:27
読み上げブックマークレット
javascript:window.onmousemove=function(e){e.target.style.outline="2px #f00 solid";};window.onmouseout=function(e){e.target.style.outline="none";};window.onclick=function(e){var t=e.target.innerText,s=new SpeechSynthesisUtterance(t);console.log(t);s.lang="ja-JP";s.pitch=0.1;s.rate=0.1;speechSynthesis.speak(s);};void(0);
@mimonelu
mimonelu / global.js
Created October 8, 2022 06:41
Bookmarklet dIsplays global properties
javascript: (() => { const w = window.open(); const k = Object.keys(w); w.close(); const m = new Map(Object.keys(window).filter(p => !k.includes(p)).map(p => [p, window[p]])); console.info('🌏 Global properties', Object.fromEntries(m)); })(); void 0;
@mimonelu
mimonelu / lospec-color-picker.js
Last active July 31, 2022 07:54
LOSPEC用カラーピッカー
// LOSPEC用カラーピッカー
// SEE: https://lospec.com/palette-list
(() => {
const current = {
target: null,
style: null,
}
window.onmouseover = (event) => {
if (event.target.parentNode) {
current.target = event.target.parentNode
@mimonelu
mimonelu / text-mosaic.js
Created July 21, 2022 08:29
文字モザイクブックマークレット
(() => {
const exclusionTags = [ 'SCRIPT', 'STYLE' ]
const exclusionCharacters = [ ' ', ' ' ]
const emptyRegex = new RegExp('^[\\s ]*$', 's')
const maskCharacters = [ '▀', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█', '▔', '▙', '▚', '▛', '▜', '▞', '▟' ]
const irandom = (min, max) => Math.floor(Math.random() * (max - min + 1)) + min
const traverseElement = (currentElement) => {
if (currentElement.nodeType === 1 && !exclusionTags.includes(currentElement.tagName)) {
currentElement.childNodes.forEach(traverseElement)
} else if (currentElement.nodeType === 3 && !emptyRegex.test(currentElement.nodeValue)) {
@mimonelu
mimonelu / text-blur.js
Created July 21, 2022 08:27
文字ぼかしブックマークレット
(() => {
const maskClassName = '__mask'
const styleElement = document.createElement('style')
document.head.appendChild(styleElement)
styleElement.sheet.insertRule(`.${maskClassName} { filter: blur(8px); }`)
const exclusionTags = [ 'SCRIPT', 'STYLE' ]
const emptyRegex = new RegExp('^[\\s ]*$', 's')
const traverseElement = (currentElement) => {
if (currentElement.nodeType === 1 && !exclusionTags.includes(currentElement.tagName)) {
currentElement.childNodes.forEach(traverseElement)
@mimonelu
mimonelu / eldenring.js
Created May 19, 2022 17:08
Eldenring Bookmarklet
javascript: (() => { const s = document.createElement('style'); document.head.appendChild(s); s.sheet.insertRule('.eldenring { all: initial; display: flex; align-items: center; opacity: 0; pointer-events: none; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; transition: opacity 2000ms linear; user-select: none; z-index: 65536; }'); s.sheet.insertRule('.eldenring[data-start="true"] { opacity: 1.0; }'); s.sheet.insertRule('.eldenring > div { background-image: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.75) 20%, rgba(0, 0, 0, 0.75) 80%, rgba(0, 0, 0, 0) 100%); color: #c00000; flex-grow: 1; font-family: serif; font-size: 10vmin; letter-spacing: 0.5vmin; padding: 2vmin 0; text-align: center; transform: scale(1.0); transition: transform 2000ms ease-out; }'); s.sheet.insertRule('.eldenring[data-start="true"] > div { transform: scale(1.25); }'); const c = document.createElement('div'); document.body.appendChild(c); c.className = 'eldenring'; const e = document.createElement('div'); c.a
@mimonelu
mimonelu / text-fragment-bookmarklet.js
Created April 25, 2022 12:30
Text Fragment Bookmarklet
javascript: (() => { const text = getSelection() + ''; if (text !== '') prompt('Text Fragment', `${location.href}#:~:text=${encodeURIComponent(text.trim())}`); else alert('テキストが選択されていません。'); })(); void 0;
@mimonelu
mimonelu / wordle-load.js
Created February 3, 2022 15:44
Wordle Load Bookmarklet
javascript: (() => { const json = prompt('wordle.txt の中身を入力してください。', ''); if (json !== '') { localStorage.setItem('statistics', json); location.reload(); } })(); void 0;
@mimonelu
mimonelu / wordle-save.js
Created February 3, 2022 15:43
Wordle Save Bookmarklet
javascript: (() => { const a = document.createElement('a'); a.download = 'wordle.txt'; a.href = URL.createObjectURL(new Blob([ localStorage.statistics ], { type: 'text/plain' })); a.target = '_blank'; a.click(); })(); void 0;