Skip to content

Instantly share code, notes, and snippets.

View sbolel's full-sized avatar
:shipit:

Sinan Bolel sbolel

:shipit:
View GitHub Profile
@sbolel
sbolel / get-chrome-extension.sh
Last active October 24, 2020 02:43
Get Chrome extension source
#!/bin/sh
# Downloads a Chrome extensions source.
# @param {string} extension_id - the id in the url for the extension
if [[ $# == 0 ]]; then
printf "Enter the ID of the extension: "
read -r extension_id
else
extension_id=$1
@sbolel
sbolel / facebookTrackersBlocklist.txt
Created April 21, 2018 16:35
Facebook Trackers Blocklist
# Blocklist for scripts appearing in data release for: https://freedom-to-tinker.com/2018/04/18/no-boundaries-for-facebook-data-third-party-trackers-abuse-facebook-login/
# "No boundaries for Facebook data: third-party trackers abuse Facebook Login"
# Data release: https://gist.github.com/englehardt/bf976e6b90f44f735749014a7a4a48b6
api.behavioralengine.com
c.lytics.io
cdn.augur.io
cdn4.forter.com
p1.ntvk1.ru
srv.clickfuse.com
st-a.props.id
(function(_document, key, btn, delay, multiplier){
const _plusOrMinus = () => Math.random() < 0.5 ? -1 : 1
const _randomTimeout = () => (_plusOrMinus() * Math.floor((Math.random() * multiplier))) + delay
this.run = false
const toggle = () => {
this.run = !this.run
if (this.run) setNext()
}
/*
1337 Translator
"Leet" or "1337" is a popular alternative alphabet used by internet geeks.
Create a translator function that takes a string and outputs that string translated to leet
Leet Codex:
A -> @
B -> 8
@sbolel
sbolel / google-voice-delete.js
Created October 24, 2020 02:40
Google Voice Deletion Script
/**
* Script that deletes all Google Voice items visible in the current list.
* @param {number} timeout - milliseconds to wait between each dialog opening.
* @usage copy and paste into JS console.
*/
(function(timeout){
const getConfirm = () => document.querySelector('[gv-test-id="dialog-confirm-button"]')
const getDelete = () => document.querySelector('[icon-name="delete"]')
const getFirst = () => document.querySelector('[gv-test-id="conversation-avatar-or-checkmark"]')
const getRest = () => document.querySelectorAll('div[md-virtual-repeat]').splice(0, 1)
@sbolel
sbolel / background.js
Created December 5, 2020 17:55 — forked from danharper/background.js
Bare minimum Chrome extension to inject a JS file into the given page when you click on the browser action icon. The script then inserts a new div into the DOM.
// this is the background code...
// listen for our browerAction to be clicked
chrome.browserAction.onClicked.addListener(function (tab) {
// for the current tab, inject the "inject.js" file & execute it
chrome.tabs.executeScript(tab.ib, {
file: 'inject.js'
});
});
@sbolel
sbolel / material-design-colors.css
Last active January 17, 2021 19:41
CSS global variables - Material Design colors
/**
* CSS Global Variables for colors in the Material Design palette
* @author Sinan Bolel <[email protected]>
* @see {@link https://material.io/design/color/the-color-system.html#color-usage-and-palettes}
* @see {@link https://material.io/resources/color}
*/
:root {
--md-color-red-50: #ffebee;
--md-color-red-100: #ffcdd2;
--md-color-red-200: #ef9a9a;
@sbolel
sbolel / color-material.css
Last active January 17, 2021 19:48
Global CSS Variables: color, font-family
/**
* CSS Global Variables for colors in the Material Design palette
* @author Sinan Bolel <[email protected]>
* @see {@link https://material.io/design/color/the-color-system.html#color-usage-and-palettes}
* @see {@link https://material.io/resources/color}
*/
:root {
--md-color-red-50: #ffebee;
--md-color-red-100: #ffcdd2;
--md-color-red-200: #ef9a9a;
@sbolel
sbolel / alexa-delete-recordings.js
Created January 24, 2021 19:20
Amazon Alexa Delete Recordings
/**
* @usage copy and paste into dev console at URL:
* https://www.amazon.com/alexa-privacy/apd/rvh
* @todo scroll to bottom to load more recordings once all loaded
* recordings are tested and the desired recordings are deleted.
*/
(function(document) {
const CLICK_DELAY = 500
const DELETE_BTN_SELECTOR = '.record-delete-banner.clickable'
@sbolel
sbolel / edge-cookies-blocked-domains.js
Last active May 10, 2021 00:55
Microsoft Edge: cookies settings - bulk add/remove blocked domains
/**
* Usage:
* - navigate to "edge://settings/content/cookies" and open devtools
* - add/remove tlds to `tlds` array below
* - copy and paste script into dev console
* - finally, call either `addAll()` or `removeAll()
*
* @example add domains
* addAll()
*