Vivaldi Forum mod
TbGbe last edited by
@TbGbe HTML5 is different from XHTML. XHTML was supposed to be a super-strict upgrade to HTML which wouldn't tolerate any errors. This never ended up panning out, and HTML5 took over instead. HTML5 is supposed to allow the document to render as a best effort.
So, parsers in browsers tend to be tolerant of errors, which is fine in principle, but they don't put an error message in the console, which is less useful as the only way a dev can see a problem is by using a validator and even then not all validators will run JS which won't catch errors created during runtime.
I think web development in general may have missed a trick by not going for strict validation.
burbuja last edited by burbuja
@LonM Hi, I think the forum pages do not exist in reallity, they are composed by php or someghing, so that similar bugs like multiple ids are difficult to find. I really loved the super strict xhtml 1.1
Does anyone familiar with the mod know what the purpose of the
window.addEventListener('popstate')listener is in
mods.js? It fires when the user presses the back button in their browser, but never fires when they navigate somewhere (i.e. the forum does a pushState).
Is there a way to do something programatically after a navigation is complete, or do we just have to rely on
clicklistener as a sort of polling backstop?
@LonM Popstate is for history changes, forward and backward.
luetage last edited by luetage
Also, related to this: If any of you have programming experience and would like to help with this. It would be great to find a solution to register history changes triggered by page navigation and infinite scroll. I looked a bit into it, but only managed to register history back/forward changes so far. The existing code can be found in mods.js. Implementing and registering further history changes could potentially make the code a bit more efficient and make everything work with infinite scroll.
Rexfahrer last edited by Rexfahrer
@luetage On your request:
Please feel free to comment on anything which does not fit your expectations.
Edit: Well, they did not fit my own expectations. This is a new version, because I was unsatisfied with the transparent edges of the letters:
Good job, the images are looking good, especially the actual logos. But the original Vivaldi text seems to be a little bit more filigree, or thinner. Especially the V & A seem to have moved closer. It's also a deeper black now. Maybe both white and black could be a bit more toned down.
As said they look fine though without direct comparison and I wouldn't say they look worse than the original, just different. We can as well keep them like that.
Rexfahrer last edited by Rexfahrer
@luetage Voila: Corrected letter spacing and thickness, and gray instead of black and white:
And as a bonus : logo-white.png with white text which imho looks better then the grey text:
@Rexfahrer Perfect, thickness and spacing looks good, and yeah, let's go with the white one. Thank you very much. Some upvotes for Rexfahrer please
I have been testing adding a "Search category" button, which would act similar to the button at https://forum.vivaldi.net/category/113/feature-requests
Basically, it exists in the header and you can use it to directly search the category you're in (it will also select it's children, too). I hate clicking search only to find I then need to remember where I was and re-select the categories in that long list.
As for looking for page loads, you can detect when the forum goes into "ajax" mode, and luckily it appends a CSS class when it does this. An example of how to do this is at: mods.js:113-114
@LonM Observing the class change generally works, but it doesn't trigger on infinite scroll. What AJAX does too is create a history entry on navigation, therefore I wanted to listen for this initially. It also changes the hash, but I didn't get it to work. The hashchange would seem promising though. I believe we probably could get it to work with the webnavigation api, but I don't want to introduce a new permission to the extension…
As it stands the click at least updates infinite scroll when you trigger it, so I don't think it makes much sense changing to the mutation observer.
About the extra search, personally I don't like the second entry and I wonder how useful it really is. You would first have to navigate to the category you want to search and it could be argued it's equally fast to just pick the category in search instead of navigating.
@luetage Ah, I have the forum paginated, so hadn't considered infinite scroll.
My intent with the search this category wasn't to replace the big menu in search, it was more as a shortcut so that if you're already in a category and wanted to search it, you could do so without having to find and select the category again.
@LonM I understand that, but I think this singular case doesn't warrant a button in navigation which doubles the already existing button. Both are a link to the same site. We could exchange your functionality with the existing one, but then you would have to readjust the search when you don't want to search the category you're already in, or you would have to first visit the category you want to search. And what if I want to search a user instead?
The button introduced in the feature request category makes sense, because you will only see it, if you intend to post a feature request or look for a specific feature; and it's in the content.
@luetage yeah... its a bit redundant. I just made it because I was mid-category, wanted to look something up, and then the forum annoyed me by me having to manually select the category I was already in.
I don't see this getting a lot of use.
I wonder if instead I could just tie it to a keypress. Say you press "alt" while clicking on search, it opens a search for the current category...
I could just remove it if it's not much use.
@LonM Yeah, that's a good idea. I think you can check for eg
shiftin a click event. Doesn't need another button and adds value to an already existing one. Would implement
- New logos with transparency by Rexfahrer
- All themes updated and working.
- Reimplemented functioning User CSS toggle.
We are back in business. New version is up on webstore, the automatic update might take a while. In case you don't wanna wait enable developer mode on extensions page and click "Update" on top.
Steffie last edited by
@luetage OMZ, i'm ahead of the game!
@Steffie This is the version released only to the most dedicated circle of users. Congratulations!
Ornorm last edited by
@luetage Proud to be part of that privileged circle