Skip to content

Instantly share code, notes, and snippets.

View eruizdechavez's full-sized avatar

Erick Ruiz de Chavez eruizdechavez

View GitHub Profile
@eruizdechavez
eruizdechavez / mark-all-as-played.js
Created January 2, 2023 09:36
Mark ALL episodes as Played in Overcast Web UI
/**
* Mark ALL episodes as Played in Overcast Web UI
* Requires https://github.com/stevegrunwell/overcast-mark-as-played
*
* This snippet is run in the JavaScript console on the Episodes list of a Podcast;
* it will read and click every Marked as Played button on every episode making
* a brief pause between clicks to avoid overloading the API server.
*/
console.log('Getting initial button count');
let count = document.querySelectorAll('.overcast-mark-as-played-btn').length;
@eruizdechavez
eruizdechavez / functions.php
Last active February 22, 2021 04:49
Search for Connections WordPress Plugin
<?php
add_filter(
'cn_entry_output_category_item',
function( $content, $category, $count, $i, $properties, $instance ) {
global $wp_rewrite;
$text = '';
$rel = is_object( $wp_rewrite ) && $wp_rewrite->using_permalinks() ? 'rel="category tag"' : 'rel="category"';
$entry = $instance->getObject();