Skip to content

Instantly share code, notes, and snippets.

@deathau
deathau / background.js
Created April 16, 2024 06:51
Inoreader unread badge extension for Wavebox
chrome.runtime.onMessage.addListener(async (payload, sender)=>{
if (payload.type === "setBadge") {
// Check if my message is from an app
const {isApp} = await chrome.waveboxApps.getInfo(sender.tab.id)
if (isApp) {
const count = parseInt(payload.count)
if (isNaN(count)) await chrome.waveboxApps.setBadge(sender.tab.id, {count: 0, activity: true})
else await chrome.waveboxApps.setBadge(sender.tab.id, {count, activity: false})
}
}
@deathau
deathau / Readme.md
Last active September 21, 2024 03:05
Obsidian scss

Obsidian SASS theme switching tools

I was building up a small library of css snippets, and mixing and matching via copy-paste was getting tiresome.
So, I knocked myself up a little solution using https://sass-lang.com/
To use this solution, you need to follow the instructions on the website to install the SASS command line utility.

Instructions

For my purposes, I created a subfolder in my Obsidian vault called ./.themes where my obsidian.scss file lives. I also created a subfolder for mixins (./.themes/mixins) containing small snippets like "Andy Matuschak" mode and collapsing sidebars (and my preferred custom colours for my Base2Tone theme)

@deathau
deathau / darkTheme.css
Last active September 13, 2018 02:00
Slack Dark theme
/* Scrollbar Chrome*/
*::-webkit-scrollbar {
width: 10px !important;
height: 10px !important;
background: #1e1e1e !important;
border: 1px solid #252525 !important;
}
*::-webkit-scrollbar-button {
display: none !important;
}
- (void)viewDidLoad
{
[super viewDidLoad];
[indicator startAnimating];
//setup secondary view controller and move to near the bottom of the view
self.secondaryViewController = [[SecondaryViewController alloc] initWithNibName:@"SecondaryViewController" bundle:nil];
self.secondaryViewController.view.center = CGPointMake(self.secondaryViewController.view.center.x, 555.0F);
self.secondaryViewController.pageSize = 3;