Vivaldi Forum mod
-
...ok so none of the suspected footnotes, superscripts etc. works. Apparently the forum uses a different flavour of markdown to the built-in notes.
oh, and I found out we can delete our own posts now
-
@lonm This isn't a science forum. We don't need latex integration to show formulas and the like . Let's keep it simple. The question is how many buttons we really wanna add. At some point it will get overwhelming.
And it's also about placement. Should zen mode and upload be kept last? Do we wanna have all extra formatting options at the end instead including emotes? All things to consider.
-
@luetage said in Vivaldi Forum mod:
Let's keep it simple.
- Agreed. Superscripts can be done with Alt+0185ΒΉ etc.
- What is zen mode? Wouldn't it be better to call it Fullscreen mode if that's what it is? Calling it Zen mode just makes its purpose obscure, even though the icon is familiar.
- I think emoticons should go after pictures.
- Tables might be best after bulleted list. Do you plan to have a numbered list?
- It would be great if a list could be applied to multiple selected paragraphs at once.
-
@luetage Checking, by the width of the page, the maximum number of buttons there can be in total is 16 before the style starts to get broken on narrow windows.
- There are 8 by default
- The emote picker counts 1 spot
That means we can pick an additional 7 to add to the formatting row. Right now, I (quite neatly ) have 7:
- Header
- Rule
- Quote
- Code
- Code Block
- Table
- Spoiler
-
@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.