Skip to content

Instantly share code, notes, and snippets.

View rivolela's full-sized avatar

Romeu Ivolela rivolela

View GitHub Profile
// roam/js code snippet to add crossing out completed todos
// also adds the CSS classname custom-strikethrough for css mods
;(()=>{
if( typeof window.roamhacker_checkboxStrikeout != 'undefined') return;
window.roamhacker_checkboxStrikeout = {};
const scanCheckboxes = () => {
chrome.extension.sendMessage({}, function(response) {
var readyStateCheckInterval = setInterval(function() {
if (document.readyState === "complete") {
clearInterval(readyStateCheckInterval);
var actions = [
[function(){return clickNode('.bp3-icon-more', '')}, 10],
[function(){return clickNode('a.bp3-menu-item', 'Export All')}, 10],
[function(){return clickNode('.bp3-dialog .bp3-button', 'Markdown')}, 10],
[function(){return clickNode('.bp3-dialog a.bp3-menu-item', 'JSON')}, 10],
@jesobreira
jesobreira / makeslug.js
Last active July 14, 2020 13:09
Create slugs with accented chars in PHP and Javascript
/*
* Javascript makeslug()
* by J. Santos <jefrey[at]jefrey[dot]ml>
*/
/*
Usage:
string makeslug( string val [, string replaceBy = "-" ] )
Example: