Skip to content

Instantly share code, notes, and snippets.

View TfTHacker's full-sized avatar

TfTHacker

View GitHub Profile
@ciceronianus
ciceronianus / Roam-colored_fonts.css
Last active April 28, 2023 08:24
(deprecated) Roam - colored bold, italics and highlight by @CatoMinor3
/*
Author:: @CatoMinor3
Version:: 3.0
Date:: Sept.rm-italicsber 22nd, 2020
Changes log:
- 3.0 - code adapted for the new classes in Roam
- 2.1 - code adaptated for future support of colour shades (different opacity),
download the additonal CSS here: https://gist.github.com/ciceronianus/5d7b224658b7a9832a6249a13091aa9d
Support:
@ottsch
ottsch / add_favicons.js
Last active July 16, 2022 17:56
Add favicon to links in Roam Research
new MutationObserver(() => {
let filtered = Array.prototype.filter.call(
document.querySelectorAll(".roam-body a"),
(a) => {
return a.hostname && !a.hostname.includes("roamresearch.com");
}
);
Array.prototype.forEach.call(filtered, (a) => {
if (a.text == "*") {
a.style.background = `url(https://www.google.com/s2/favicons?sz=16&domain=${a.hostname}) right center no-repeat`;
/*
* Viktor's Roam Mobile Double tap to Exluce Filters and Right click on bullets
* version: 0.2
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node
/*
* Viktor's Roam Mobile Long tap to Exluce Filters and Right click on bullets + pages + title
* version: 0.3
* author: @ViktorTabori
*
* How to install it:
* - go to page [[roam/js]]
* - create a node with: { {[[roam/js]]}}
* - create a clode block under it, and change its type from clojure to javascript
* - allow the running of the javascript on the {{[[roam/js]]}} node
@thesved
thesved / roam-open-page-in-sidebar.js
Last active February 20, 2023 21:24
Open a page in Roam's sidebar POC
/*
* Open a page in Roam's sidebar POC, h/t @dvargas92495
* version: 0.4 Mutation Observer, returns Promise
* author: @ViktorTabori
* use: await openPageSidebar("Page Title")
*/
openPageSidebar = (function(){
var observer,
doLog = true, // console.log
running = false, // status;
@dkapila
dkapila / roam_back_forward_navigation.js
Last active September 29, 2020 00:02
Adds back forward buttons in Roam - useful when using it as an app
;(function () {
// Don't show navigation controls on mobile
if(/Android|iPhone/i.test(navigator.userAgent)){
return;
}
// Only show navigation controls when using Roam in app mode
if ((window.navigator.standalone == true) || (window.matchMedia('(display-mode: standalone)').matches)) {
const navigation_controls = document.createElement("div");
navigation_controls.id = 'roam-navigation-controls';
@jlongtine
jlongtine / README.md
Last active November 28, 2020 08:18
youtube-timestamp.ts

You can add this to Roam using {{[[roam/js]]}}

Grab the code in youtube-timestamps.js and drop it in a javascript code block:

  ```javascript```

You can have timestamps at the beginning of any nested block. H:MM:SS

You can use the ctrl+shift+y hotkey (currently assumes you have Roam42 installed, let me know if you'd prefer I drop that requirement) to grab the current timestamp of the video you're cursor is nested under and add it to the beginning of your block.

@GitMurf
GitMurf / attr-table-filters.js
Last active June 13, 2023 03:16
Filtering attribute tables
/*
****************************************************************************************
****************************************************************************************
****************************************************************************************
NOW HOSTING CODE VIA MY MAIN GITHUB REPOSITORY FOR ROAM SO THAT USERS CAN LINK DIRECTLY TO THE CODE AND AUTO UPDATE
GO HERE FOR INSTALLATION INSTRUCTIONS: https://github.com/GitMurf/roam-javascript#installation
****************************************************************************************
@azlen
azlen / bulletpaths.js
Last active April 15, 2024 14:06
All Paths Lead to Roam
/*
* credit to Dhrumil Shah (@wandcrafting) and Robert Haisfield (@RobertHaisfield)
* for the original concept which was part of their RoamGames submission
* and can be found at: https://www.figma.com/file/5shwLdUCHxSaPNEO7pazbe/
*
*/
/* ======= OPTIONS ======== */
/* note: if you change these, reload the page to see the effect */
@GitMurf
GitMurf / obsidian.templater.quick-capture.js
Last active April 22, 2024 15:14
Obsidian Quick Capture using templater. Activate from anywhere in your vault to record quick ideas, notes, time logging, etc. The Quick Capture file does NOT need to be open.
<%*
//v1.4: Adding option for including a header for each DNP day to fold
//'first' will add to top of file. 'last' will add to bottom of file
let firstOrLastLine = 'first';
//Name of the Quick Capture file. Do NOT include extension '.md'
let qcFileName = 'Quick Capture';
//Leave this blank if you want to use the default file path location (set to '/' to use root of vault)