Vivaldi Forum mod
-
@lonm I understand that. But I didn't talk about what's doable, but about what's reasonable. 16 buttons overall is too much in my opinion.
Personally I'd cut it down to the most interesting ones – emotes, code block, table, spoiler. Headers are rarely used and people who need them will find the # symbol, same goes for lines. Quotes are done by simply selecting text on the page and hitting reply, or by hitting the quote button. Code could make sense.
-
@luetage said in Vivaldi Forum mod:
Code could make sense.
Serif CommunityPlus has 12, which is not too much.
- Bold
- Italic
- Link
- Quote
- Code
- Picture
- Numbered List
- Bulleted List
- Heading
- Rule
- Undo
- Redo
Can you figure out a way to combine numbered and bulleted lists in one button?
-
@pesala Yeah, 12 sounds reasonable.
If I could make my personal version I'd get rid of bold, italic, list and strikethrough first, never use them
edit: I'm really dumb, I can get rid of them with user css…
-
@luetage For anyone interested:
.composer .formatting-bar .formatting-group li[title="Bold"], .composer .formatting-bar .formatting-group li[title="Italic"], .composer .formatting-bar .formatting-group li[title="List"], .composer .formatting-bar .formatting-group li[title="Strikethrough"] { display: none; }
I'm a happy ??? now
-
I wonder if it would be worth making some sort of system where users could pick from a list which ones they wanted to show on the bar, and leave it up to them.
-
@lonm Wow! You're offering candies, chocolate, muffins and cakes tonight... Yummy!
-
@lonm Yeah, makes sense. This way none of your work goes to waste and everyone can make their own setup. Since they all can be hidden with css it's probably easiest not to mess with this on the settings page, but from the editor directly. Could be done with right click, but maybe a dedicated settings button at the end of the buttons in the formatting group with a popup is the more sensible approach. Should probably be positioned in a way that it can't get cut off when the editor is low.
-
@luetage In order to do this best, I need to access
chrome.storage
. However, I see that the way the scripts are currently being injected is by appending a<script src>
tag. This means I can't access the necessary chrome APIs as the mod runs in the context of the web page.I don't want to start breaking the architecture that is set up, so one way around this I see would be to keep the settings in the options page, and append an additional
<script>
tag with a definition of the buttons selected as a global variable. It's less user friendly that way, but maintains the coding style better.Alternatively, I could set the mod file to always inject as a content script, and then check
chrome.storage
to see if it's turned on before actually starting the mod. One downside to that is it is it needs to inject the file even if it doesn't get turned on, which seems unclean.I'd rather not programmatically inject as that needs a whole new permission (
tabs
) which is a bit overkill.Edit: Another option would be to use the local storage of the page, but that might not work as I don't know if the forum software would randomly clear it or overwrite it at certain points.
-
@lonm True, but you should be able to use message passing to let variables be saved in the background script and then equally send a message if you need to access these variables. If you want to, I'll set this up, shouldn't be that big of a deal, although I haven't tested this scenario yet.
And yeah, I don't want to introduce another permission either, last time all sorts of people became paranoid when I introduced the storage permission . If the variant I described just now shouldn't work, this can also be a content script.Maybe the cleanest way is to save this as array and remove from and push to that array to save the visible or invisible buttons.
-
@luetage I thought message passing was only possible to do that from content scripts, but I looked a bit further, and it seems you can use message passing from normal scripts on a page if you add this to the manifest:
"externally_connectable": { "matches": [ "https://forum.vivaldi.net/*" ] }
Unfortunately, this ends up adding an extra permission (which isn't specified on the documentation annoyingly - wish I had known it prior, it would have saved me time looking into this ).
The most "frictionless" for the users would probably be to just include it as a content script.
-
@lonm You're correct, I should have tried this sooner. You need to specify the extension ID and then it doesn't get passed because of missing permission…
-
Small intermission update version 1.58: draggable emote picker
-
@luetage
Hi, thank you for developing this extension.
I use it from the very first time and it getting better and now even funnier., mib
-
@luetage Nice one! It works very well
-
A small FR: An additional option to see a specific signature in a post even when are hidden (a small clickable area under any post which expand the area?). While hiding them is useful to declutter the threads, would be nice to see a single entry sometimes.
//edit: already there -
@hadden89 Hello hadden, are you requesting for this?
which, when clicked, gives this?
If it is the case, it's already there. -
@ornorm are you using the unpacked version? I don't see it. But maybe I just have to check
-
@ornorm To enable under "Select modifications"
-
@ornorm mmh.. oh well, maybe was updated recently.
That option, sometime ago, used to hid the whole signature with no button. (Or my V was drunk, who knows)
Yeah, this solution is fine to me -
@hadden89 I don't know if it's unpacked or not. I just installed it from the Chrome web store