Loveberry
Quick how-to's for your status cafe widget
This covers different ways to style your status cafe widget, please note that for any of these to work you need to follow the initial set up section. All of these assume you already have a status cafe account, of course! Make sure to replace USERNAME with your own status cafe username.
Initial set up
- From the status cafe website, go to the status widget page
- From this page, look within the "html file" section, withinn this code, you should see a section tht says <script src="https://status.cafe/current-status.js?name=USERNAME" defer></script>, yet with the USERNAME section having your status cafe username. Copy the url from it and open it in a new tab.
- In the new tab with the JS code, you want to copy all of this and add it to a new status cafe JS file. This self hosted version will be the base of any changes below.
- Once you have uploaded this to your site, wherever your status cafe widget is, replace the https://status.cafe/current-status.js?name=USERNAME link with the location of your site-uploaded script
Change or remove the username
- In your site-hosted status cafe js file, go to the section containing '<a href="https://status.cafe/users/USERNAME" target="_blank">' + r.author + '</a>
- To change the username: change this section to be all within '. Below is an example line of code:
document.getElementById("statuscafe-username").innerHTML = '<a href="https://status.cafe/users/USERNAME" target="_blank"> DESIRED INFO HERE </a> ' + r.face + ' ' + r.timeAgo
- To remove the username: you mainly need to remove the a href link. your code should start with r.face if doing this. r.face is the emoji you add to your status. below is an example code:
document.getElementById("statuscafe-username").innerHTML = r.face + ' ' + r.timeAgo
Removing the emoji
- In your site-hosted status cafe js file, look for the section containing r.face
- To remove this cleanly, make sure you remove + r.face + ' ' . Below is the line without this section included for you to take:
document.getElementById("statuscafe-username").innerHTML = '<a href="https://status.cafe/users/USERNAME" target="_blank">' + r.author + '</a> ' + r.timeAgo
Go back?