Skip to content

Instantly share code, notes, and snippets.

Avatar

Quentin Cole no2pixel

View GitHub Profile
@no2pixel
no2pixel / nowhal.js
Last active Jan 19, 2020 — forked from jziggas/nowhal.js
JavaScript to delete all of your Reddit comments
View nowhal.js
// Go to https://www.reddit.com/user/<username>/ and paste into your console.
// Reddit throttles these actions, hence the 1s timer.
let interval = setInterval(() => {
let deleteButtons = $('a.togglebutton[data-event-action="delete"]');
if (deleteButtons.length === 0) {
clearInterval(interval);
if ($('.next-button > a')[0]) {
location.reload();
}
@no2pixel
no2pixel / functions.php
Created Oct 14, 2016 — forked from mikaelz/functions.php
WooCommerce auto-update cart when quantity changed
View functions.php
/**
* Auto update cart after quantity change
*
* @return string
**/
add_action( 'wp_footer', 'cart_update_qty_script' );
function cart_update_qty_script() {
if (is_cart()) :
?>
<script>
@no2pixel
no2pixel / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console