The former takes people from other domains and makes their posts green text on green background. The colors are manually set and not reflective of any magazine styles or the like, but I have no idea why rgba(20, 45, 20, 1.0) is the color someone chose. I recommend anyone who wants that script edit line#41 to something like GM_addStyle('[data-is-federated-content="true"] { background-color: #EEE; }');, but even then this is a bit annoying to have to do manually.
I went a bit farther and used the built in variable to set color, as well as setting the font weight down to match the “n hours ago” text, and changing " - " to “@” so that the uesrname matched the standard fediverse string that you can put into search boxes
I’ll publish this properly as soon as greasyfork sends me an email to authenticate my new account, but in the meantime here’s the source. EDIT: Email has yet to arrive 13 hours later, I doubt it’s going to. Anyone interested feel free to publish this somewhere it’s easier for people to install.
// ==UserScript==// @name kbin social add home-instance name to username (modified)// @namespace english// @description kbin social add home -instance name to username, modified to match style and fediverse formatting// @include http*://*kbin.social*// @version 1.16// @run-at document-end// @require https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js// @license MIT// @grant GM_addStyle// ==/UserScript==
$( document ).ready(function() {
$( ".user-inline" ).each(function() {
// get username URL and text, then remove username from URL and paste the instance name after username (not if instance is home-instance of kbin.socialvar homeinstance = $(this).attr('href') ;
var myname = $(this).text().trim();
var homeinstance2 = homeinstance.replace( "/u/@" + myname + "@" , '');
if( homeinstance2 != "/u/" + myname ){ //show nothing if home-instance kbinconsole.log(homeinstance2 );
$(this).append( "<span>@" + homeinstance2 +"</span>" );
}
});
}); //end each username a hrefvar style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '#content a.user-inline span{color: var(--kbin-meta-text-color); font-weight: 400}' ;
document.getElementsByTagName('head')[0].appendChild(style);
While I personally agree with you on desktop Firefox, Firefox on Android (or at least most user-facing versions of it), have a curated list of approved addons and it’s generally impossible or at best incredibly difficult to install any addons outside that list. Tampermonkey is included but Violentmonkey is not.
Not sure if it’s just a me problem or a wider known issue but both of those scripts stop working for me when I have infinite scrolling enabled. They work great on the 1st page but when it loads the next page they both stop working.
Highly recommend both the script Kbin Federation Awareness and kbin social add home-instance name to username. Makes it a lot easier to tell where things are originating from at a glance!
The former takes people from other domains and makes their posts green text on green background. The colors are manually set and not reflective of any magazine styles or the like, but I have no idea why rgba(20, 45, 20, 1.0) is the color someone chose. I recommend anyone who wants that script edit line#41 to something like
GM_addStyle('[data-is-federated-content="true"] { background-color: #EEE; }');
, but even then this is a bit annoying to have to do manually.It works on dark theme (I use only dark).
On dark it’s light (white) text on dark green background, and it looks fine (I would prefer black or similar, but this works).
Your edit breaks dark design because you get white/grey background.
I can’t read shit on comments now with the script that colors comments based on federation
This is how it looks for me
https://i.postimg.cc/nz4S7KqT/IMG-20230629-011120.jpg
My font is black with that script. It’s likely another script messing with this. I’ll investigate.
I have only this script, so mine is vanilla.
Could be mish mash of script styles
I went a bit farther and used the built in variable to set color, as well as setting the font weight down to match the “n hours ago” text, and changing " - " to “@” so that the uesrname matched the standard fediverse string that you can put into search boxes
I’ll publish this properly as soon as greasyfork sends me an email to authenticate my new account, but in the meantime here’s the source. EDIT: Email has yet to arrive 13 hours later, I doubt it’s going to. Anyone interested feel free to publish this somewhere it’s easier for people to install.
// ==UserScript== // @name kbin social add home-instance name to username (modified) // @namespace english // @description kbin social add home -instance name to username, modified to match style and fediverse formatting // @include http*://*kbin.social* // @version 1.16 // @run-at document-end // @require https://cdn.jsdelivr.net/npm/jquery@3/dist/jquery.min.js // @license MIT // @grant GM_addStyle // ==/UserScript== $( document ).ready(function() { $( ".user-inline" ).each(function() { // get username URL and text, then remove username from URL and paste the instance name after username (not if instance is home-instance of kbin.social var homeinstance = $(this).attr('href') ; var myname = $(this).text().trim(); var homeinstance2 = homeinstance.replace( "/u/@" + myname + "@" , ''); if( homeinstance2 != "/u/" + myname ){ //show nothing if home-instance kbin console.log(homeinstance2 ); $(this).append( "<span>@" + homeinstance2 +"</span>" ); } }); }); //end each username a href var style = document.createElement('style'); style.type = 'text/css'; style.innerHTML = '#content a.user-inline span{color: var(--kbin-meta-text-color); font-weight: 400}' ; document.getElementsByTagName('head')[0].appendChild(style);
This is awesome.
Great work! :)
kbin enhancement script does both of those things and more.
I had slept on that particular script, thanks for pointing it out!
Wish I could use these on FF mobile.
You can use Tampermonkey on Firefox mobile to run these scripts. I just installed both of them they work great!
This is the way! Though I personally prefer Violentmonkey.
While I personally agree with you on desktop Firefox, Firefox on Android (or at least most user-facing versions of it), have a curated list of approved addons and it’s generally impossible or at best incredibly difficult to install any addons outside that list. Tampermonkey is included but Violentmonkey is not.
Not incredibly difficult, it just requires 5 min setup, and creating your add-on collection
If you enable developer mode in android firefox, there is option to add custom addon collection.
It is only couple of steps.
Also firefox beta/nightly has couple of additional addons by default
All of these userscripts are great. I just wish someone would do one to get rid of card view
You mean the thing you get when you hover over someone’s profile pic?
Why!?
Not sure if it’s just a me problem or a wider known issue but both of those scripts stop working for me when I have infinite scrolling enabled. They work great on the 1st page but when it loads the next page they both stop working.
kbin enhancement script has this fixed.
Thanks for the heads up!