Skip to content

Instantly share code, notes, and snippets.

View ushironoko's full-sized avatar
👋

ushironoko ushironoko

👋
View GitHub Profile
@ushironoko
ushironoko / amazon_non_user_name.css
Last active January 7, 2022 04:13
amazon non user name
div#nav-global-location-slot {
display: none !important;
}
a#nav-link-accountList > div.nav-line-1-container > span.nav-line-1 {
display: none !important;
}
div#contextualIngressPtLabel_deliveryShortLine {
display: none !important;
@ushironoko
ushironoko / autorunner.js
Last active November 26, 2021 11:19
remove amazon url referre & copy on clipboard
// https://chrome.google.com/webstore/detail/scriptautorunner/gpgjofmpmjjopcogjgdldidobhmjmdbm?hl=ja-jp
const refURL = location.href
const sliceURL = refURL.indexOf("ref") ? refURL.slice(0,refURL.indexOf("ref")) : refURL
const amazonUrlCopyButton = document.createElement("button")
amazonUrlCopyButton.addEventListener('click', () => navigator.clipboard.writeText(sliceURL))
amazonUrlCopyButton.textContent = "URLをコピー"
amazonUrlCopyButton.classList.add("a-button", "a-button-primary", "a-button-small")
amazonUrlCopyButton.style.width="120px"
@ushironoko
ushironoko / autorunner.js
Last active November 26, 2021 11:18
jobcan dark mode
/*
* Paste in "SunippetAutoRunner" Extention and enter "jobcan.jp" as the hostname
* https://chrome.google.com/webstore/detail/scriptautorunner/gpgjofmpmjjopcogjgdldidobhmjmdbm
*/
document.querySelector('html').style.transition = 'all .6s'
document.querySelector('main').style.display = 'flex';
document.querySelector('main').style.justifyContent = 'center';
document.querySelector('html').style.webkitFilter = 'invert(1) hue-rotate(180deg)'
const result = document.querySelector('#search-result')
const list = result.getElementsByTagName('div')
@ushironoko
ushironoko / autorunner.js
Last active November 26, 2021 11:13
Place a button to copy the GitHub title and URL
// https://chrome.google.com/webstore/detail/scriptautorunner/gpgjofmpmjjopcogjgdldidobhmjmdbm?hl=ja-jp
const title = document.querySelector('.js-issue-title')?.textContent.trim()
if(title) {
const url = location.href
const copyButton = document.createElement('button')
copyButton.addEventListener('click', () => navigator.clipboard.writeText(`${title}\n${url}`))
@ushironoko
ushironoko / autorunner.js
Created November 26, 2021 11:11
auto update timeline on twitter(ja)
// https://chrome.google.com/webstore/detail/scriptautorunner/gpgjofmpmjjopcogjgdldidobhmjmdbm?hl=ja-jp
setInterval(() => {
let b = document.querySelector('#react-root > div > div > div.css-1dbjc4n.r-18u37iz.r-13qz1uu.r-417010 > main > div > div > div > div.css-1dbjc4n.r-14lw9ot.r-jxzhtn.r-1ljd8xs.r-13l2t4g.r-1phboty.r-1jgb5lz.r-11wrixw.r-61z16t.r-1ye8kvj.r-13qz1uu.r-184en5c > div > div.css-1dbjc4n.r-1jgb5lz.r-1ye8kvj.r-13qz1uu > div > div > section > div > div > div:nth-child(1) > div > div')
b ? b.click() : (() =>{console.log('pass')})
}, 1000)
@ushironoko
ushironoko / getCompilerOptions.ts
Created August 26, 2020 02:40
get tsconfig compiler options
function getCompilerOptions(rootDir: string, configName = 'tsconfig.json') {
const parseConfigHost: ts.ParseConfigHost = {
fileExists: ts.sys.fileExists,
readFile: ts.sys.readFile,
readDirectory: ts.sys.readDirectory,
useCaseSensitiveFileNames: true,
}
const configFileName = ts.findConfigFile(
rootDir,
@ushironoko
ushironoko / keybindings.json
Last active June 11, 2020 15:46
toggle vetur.experimental.templateInterpolationService Settings
// add extention "Toggle" https://marketplace.visualstudio.com/items?itemName=rebornix.toggle
[
{
"key": "alt+cmd+v",
"command": "toggle",
"when": "editorTextFocus",
"args": {
"id": "vetur",
"value": [
{
@ushironoko
ushironoko / snippets.ts
Last active May 22, 2020 09:50
rollup-vue-plugin typescript2 snippet
// rollup.build.config
import path from 'path'
import vue from 'rollup-plugin-vue'
import resolve from '@rollup/plugin-node-resolve'
import common from '@rollup/plugin-commonjs'
import babel from '@rollup/plugin-babel'
import typescript from 'rollup-plugin-typescript2'
import alias from '@rollup/plugin-alias'
import postcss from 'rollup-plugin-postcss'
@ushironoko
ushironoko / webpack.config.js
Created May 1, 2020 06:59
vue3 webpack conf
/* eslint-disable @typescript-eslint/no-var-requires */
const { resolve } = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const { CleanWebpackPlugin } = require('clean-webpack-plugin')
const { VueLoaderPlugin } = require('vue-loader')
const webpack = require('webpack')
const outputPath = resolve(__dirname, 'dist')
/** @type {import('webpack').ConfigurationFactory} */
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
resolve: {
extensions: ['.ts', '.tsx', '.js', '.jsx']
},
module: {
rules: [
{