Skip to content

Instantly share code, notes, and snippets.

View mimonelu's full-sized avatar
💭
🦀

mimonelu mimonelu

💭
🦀
View GitHub Profile
@mimonelu
mimonelu / doodle.js
Last active April 4, 2019 12:52
🎨 全画面落書きブックマークレット
(() => {
const retina = 2;
const lineWidth = 7;
const scratchCanvas = document.querySelector('.scratch-canvas');
if (scratchCanvas) {
scratchCanvas.style['display'] = scratchCanvas.style['display'] === 'none' ? '' : 'none';
} else {
const canvas = document.createElement('canvas');
canvas.setAttribute('class', 'scratch-canvas');
canvas.width = document.documentElement.scrollWidth * retina;
@mimonelu
mimonelu / cookie-clicker-clicker.js
Created April 30, 2019 04:16
🍪 CookieClickerClicker
@mimonelu
mimonelu / App.vue
Created May 7, 2020 14:12
vue-formulate-test
<template>
<div id="app">
<div class="column">
<FormulateInput
type="checkbox"
label="I accept the terms of service?"
name="terms"
validation="accepted"
/>
@mimonelu
mimonelu / FontChanger.js
Created March 5, 2021 12:29
Font Changer Bookmarklet
javascript: (() => { const fonts = [ '-', 'serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'ui-serif', 'ui-sans-serif', 'ui-monospace', 'ui-rounded', '-', 'Arial', 'Arial Black', 'Bookman', 'Comic Sans MS', 'Courier', 'Courier New', 'Garamond', 'Georgia', 'Impact', 'Palatino', 'Tahoma', 'Times', 'Times New Roman', 'Trebuchet MS', 'Verdana' ]; const select = document.createElement('select'); select.style.cssText = 'position: fixed; top: 1rem; right: 1rem; z-index: 65535;'; fonts.forEach((font) => { const option = document.createElement('option'); option.innerText = font; select.appendChild(option); }); select.onchange = () => { let font = fonts[select.selectedIndex]; if (font === '-') font = ''; document.body.style.fontFamily = font; }; document.body.appendChild(select); select.focus(); })(); void 0;
@mimonelu
mimonelu / cookie-clicker-clicker-bookmarklet.txt
Last active March 23, 2021 05:35
🍪 Cookie Clicker Clicker Bookmarklet
@mimonelu
mimonelu / amazon-only-bookmarklet.txt
Last active March 21, 2021 06:43
🅰 Amazon Only Bookmarklet
javascript: (() => { const param = 'rh=p_6%' + '3AAN1VRQENFRJN5'; if (location.search.indexOf(param) !== - 1) { const regexp = new RegExp(`&?${param}`, 'g'); location.search = location.search.replace(regexp, ''); } else { location.search += (location.search === '' ? '' : '&') + param; } })(); void 0;
@mimonelu
mimonelu / dom2image.txt
Last active April 1, 2021 10:23
📷 Dom2Image
javascript: ((g, d) => { if (!g.domtoimage) { const $script = d.createElement('script'); $script.src = 'https://cdn.jsdelivr.net/npm/[email protected]/dist/dom-to-image.min.js'; d.body.appendChild($script); } let enabled = true; let $prevNode = null; const onMouseMove = (e) => { if (!enabled) { return; } e.target.style.outline = '4px dashed #ff0000'; if ($prevNode && $prevNode !== e.target) { $prevNode.style.outline = 'none'; } $prevNode = e.target; }; const onClick = async (e) => { if (!enabled) { return; } e.preventDefault(); e.target.style.outline = 'none'; const src = await domtoimage.toPng(e.target); download('dom2image.png', src); }; const download = (fileName, href) => { const $link = d.createElement('a'); $link.download = fileName; $link.href = href; $link.target = '_blank'; $link.click(); }; const onKeyUp = (e) => { if (e.code === 'Escape') { enabled = !enabled; if (!enabled && $prevNode) { $prevNode.style.outline = 'none'; } } }; g.Dom2Image = true; g.addEventListener('mousemove', onMouseMove); g.a
@mimonelu
mimonelu / chatwork-logger.js
Created December 28, 2021 07:23
Chatworkのログを雑に保存するブックマークレット
javascript: (() => { const title = document.querySelector('.chatRoomHeader__roomTitle').innerText; const text = document.querySelector('#_timeLine').innerText; const dataURL = `data:application/plain;charset=utf-8,${encodeURIComponent(text)}`; const a = document.createElement('a'); a.download = `${title}.txt`; a.href = dataURL; a.click(); })(); 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;
@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;