I hereby claim:
- I am jeffwesson on github.
- I am jeffwesson (https://keybase.io/jeffwesson) on keybase.
- I have a public key ASDKTllWxBegNZqvgbMit1xzixOrXwY-6_h6lYn4Om6KbAo
To claim this, I am signing this object:
const config = { childList: true, subtree: true }; | |
const $target = document.querySelector('body'); | |
const removeAds = () => { | |
[...document.querySelectorAll('[href="#"]')] | |
.filter(e => e.innerText === 'Sponsored') | |
.forEach(e => { | |
var parent = e.closest('[id^="substream_"]'); | |
console.log('Another ad bites the dust!'); | |
parent.parentElement.removeChild(parent); | |
}); |
const config = { childList: true, subtree: true }; | |
const $target = document.querySelector('body'); | |
const removeAds = () => { | |
const selector = '[data-testid="placementTracking"]'; | |
document.querySelectorAll(selector).forEach(e => { | |
console.log('Another ad bites the dust!'); | |
e.parentElement.removeChild(e); | |
}); | |
}; | |
removeAds(); |
I hereby claim:
To claim this, I am signing this object:
Array.prototype.slice.call(document.querySelectorAll('.productRow .productContainer .productContent')).reduce((a, item) => { | |
let o = {}; | |
o['requested'] = parseInt(item.querySelector('.requested').innerText.replace(/\D/g, '')); | |
o['purchased'] = parseInt(item.querySelector('.purchase').innerText.replace(/\D/g, '')); | |
o['price'] = parseFloat((item.querySelector('.rlpPrice') || item.querySelector('.toalpriceLtl')).innerText.replace(/[^\d\.]/g, '')); | |
a.push(o); | |
return a; | |
}, []).filter(item => item.requested !== item.purchased).reduce((s, item) => { | |
s += item.price * item.requested - item.purchased; | |
return s; |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<input type="text" id="x" maxlength="11" pattern="\d{3}\-\d{2}\-\d{4}"> | |
<script> |
const bubbleSort = function (arr) { | |
let store = null; | |
let maxProfit = 0; | |
for (let i = 0; i < arr.length; i++) { | |
for (let j = 0; j < arr.length - 1; j++) { | |
if (arr[j] > arr[j + 1]) { | |
store = arr[j]; | |
arr[j] = arr[j + 1]; | |
arr[j + 1] = store; | |
} |
defaults write com.apple.dock persistent-apps -array-add '{"tile-type"="spacer-tile";}' | |
killall Dock |
function reverseString(str) { | |
var chars = str.split(""), | |
letterNum = 1, | |
start = "A".charCodeAt(0), | |
end = "Z".charCodeAt(0), | |
list = []; | |
function opposite(char) { | |
var oppCharCode, | |
re = /[A-Za-z]/g; |
var divs = document.getElementsByTagName("div"); | |
var products = []; | |
for (var i = 0; i < divs.length; i ++) { | |
if (/^item_price_/.test(divs[i].id)) { | |
products.push(divs[i]); | |
} | |
} | |
var rawPrices = []; | |
var priceClass = /-price\b/; |
function formatNumber(num) { | |
if (!isNaN(Number(num))) { | |
var numLength = num.toString().split('').length; | |
if (numLength % 3 !== 0) { | |
// do complex shit, | |
// but return 0 for now | |
return 0; | |
} | |
var regexString = ''; | |
var formatTemplate = ''; |