Skip to content

Instantly share code, notes, and snippets.

View verfasor's full-sized avatar
☠️
misfit.

verfasor

☠️
misfit.
View GitHub Profile
@verfasor
verfasor / show-post-time-bear-blog-min.js
Created November 23, 2025 09:51
script to show post time next to date on bear blog (minified)
<script>(function(){function addTimeToPostDates(){if(!document.body.classList.contains('post')){return}
const timeElements=document.querySelectorAll('main time');timeElements.forEach(timeEl=>{if(!timeEl.dateTime)return;const postDate=new Date(timeEl.dateTime);const now=new Date();const isToday=postDate.getDate()===now.getDate()&&postDate.getMonth()===now.getMonth()&&postDate.getFullYear()===now.getFullYear();let hours=postDate.getHours();const minutes=postDate.getMinutes();const ampm=hours>=12?'PM':'AM';hours=hours%12;hours=hours?hours:12;const minutesStr=minutes.toString().padStart(2,'0');const timeStr=`${hours}:${minutesStr} ${ampm}`;const currentDateText=timeEl.innerText.trim();if(isToday){timeEl.innerText=`Today • ${timeStr}`}else{timeEl.innerText=`${currentDateText} • ${timeStr}`}})}
if(document.readyState==='loading'){document.addEventListener('DOMContentLoaded',addTimeToPostDates)}else{setTimeout(addTimeToPostDates,100)}})()</script>
@verfasor
verfasor / show-post-time-bear-blog.js
Last active November 24, 2025 14:40
script to show post time next to date on bear blog
// Bear Blog - Show Post Time
// Add this script to your Bear Blog custom JS section (footer directive) to show post time next to date
// Works with single post pages (body.post)
// Explainer: https://mighil.com/script-to-show-post-time-next-to-date-on-bear-blog
(function() {
// Wait for DOM to be ready and Bear's date formatting to complete
function addTimeToPostDates() {
// Only run on single post pages (body has class "post")
if (!document.body.classList.contains('post')) {
@verfasor
verfasor / sort-posts-by-month.js
Last active November 10, 2025 06:04
script to sort posts by month on bear blog
/**
* Sort Posts by Month
* Groups blog posts by month/year and displays them with a header showing total count and last updated date.
* Use with {{posts}} embed on a Bear Blog page.
* Explainer: https://mighil.com/script-to-sort-posts-by-month-on-bear-blog
*
* Usage:
* <h2 class="archive">Loading posts...</h2>
* {{posts}}
* <script src="https://your-domain.com/path/to/archive-sort.js"></script>
@verfasor
verfasor / bear-blog-bulk-canonical-url-updater-script.js
Created November 8, 2025 17:29
bear blog bulk canonical URL updater script
// ==UserScript==
// @name Bear Blog Bulk Canonical URL Updater
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Bulk update canonical URLs for Bear Blog posts to https://yourdomain.com/{slug}
// @author Mighil.com
// @match https://bearblog.dev/*
// @match https://*.bearblog.dev/*/dashboard/posts*
// @grant none
// ==/UserScript==
@verfasor
verfasor / aesthetic.md
Created January 31, 2024 10:20
aes·thet·ic
title link meta_description meta_image lang tags
aes·thet·ic
aesthetic
while purists may not like it, i don't see any way of stopping this newest slang usage of "aesthetic"
en
culture

the term aesthetic on google trends

@verfasor
verfasor / mgx-v1.0.0.css
Created December 15, 2023 04:09
mgx-v1.0.0.css for bearblog
/* Settings */
:root {
--color-dark: #1a1a1a;
--color-light: #fafafa;
--color-primary: #1a0dab;
--spacing: 1rem;
--font-stack: system-ui;
--max-width: 700px;
}
@verfasor
verfasor / bminus.js
Created November 22, 2023 11:09
bminus.js
addEventListener("DOMContentLoaded", () => {
document.querySelectorAll('*').forEach(element => {
Array.from(element.childNodes).filter(node => node.nodeType === Node.TEXT_NODE).forEach(node => {
node.nodeValue = node.nodeValue
.replace(/ ʕ•ᴥ•ʔ/g, "")
.replace(/Made with/g, "powered by");
});
});
});
@verfasor
verfasor / current_day.js
Created October 19, 2023 09:43
current_day.js
<!DOCTYPE html>
<html>
<head>
<title>Current Day</title>
</head>
<body>
<h2 id="currentDay"></h2>
<script>
var today = new Date();
var dayNumber = today.getDay();
@verfasor
verfasor / mwai-ios-light.css
Created April 5, 2023 12:19
mwai-ios-light.css
.mwai-name .mwai-avatar {
display:none !important;
}
.mwai-name .mwai-avatar {
display:none !important;
}
.mwai-input {
border-top: none !important;
margin: -10px;
@verfasor
verfasor / functions-additional.php
Last active March 10, 2023 04:01
Bring your own key setup for AI Engine WordPress plugin
// Add this to the top of your functions.php file
// WP Session
function register_my_session(){
if( !session_id()){
session_start();
}
}