Edit Post button for BearBlog
Add an 'Edit Post' bookmark to your browser using the code below. When viewing a post on your blog, just click this button to edit it.
Code
Copy+paste the following and use it as the URL for a bookmark.
javascript:
username="YOUR_USERNAME";
use_new_tab=false;
/** gets the post's id from the analytics CSS */
function get_post_id(){
f='token: "';
m=document.querySelector("body > main").innerHTML;
id=m.substring(m.indexOf(f)+f.length);
id=id.substr(0,id.indexOf('"'));
return id;
}
if (username=="YOUR_USERNAME")username = document.querySelector('meta[content="look-for-the-bear-necessities"]').getAttribute('name');
/* gets the post id from the html markup of discoverable posts, or calls get_post_id() */
post_id = document.querySelector('[name=uid]')?.value??get_post_id();
/* Check if it's the home page */
if (window.location.pathname == '/')path = "/dashboard/";
else path = "/dashboard/posts/"+post_id+"/";
/* open the edit post page */
window.open("https://bearblog.dev/"+username+path, use_new_tab?"_blank":"_self");
IF IT DOESN'T WORK: Replace YOUR_USERNAME. Mine is reedybear because my dashboard url is like bearblog.dev/reedybear/dashboard/. It should auto-detect your username, but it might fail, idk.
YOU MAY: set use_new_tab=true; in order to have the edit post page open in a new tab.
Related: Other BearBlog Tools by me
Unrelated: Please ask Steam to improve RSS Support
Old Solutions - It no longer worked for non-discoverable posts because of a change made to BearBlog, and I think it never worked for the home page.
November 15, 2025 Update: A Bearblog update broke the button for non-discoverable posts. The code has been updated. Also, usernames should now be discovered automatically.