Open in Dialog mod
-
I might look more into it later. but I fixed the search engine part by doing.
function dialogTabSearch(engineId, selectionText) { dialogTab("https://www.google.com"); }
-
@oudstand Just tried out your mod on my snapshot version and works really well! So well that I tried to create a chain command for it, then realized that "oh wait... dammit".
Two small things I noticed :
- you can keep opening dialogs on top of dialogs. nothing breaks, but maybe a "way" to see/noticed how many are opened or something would be neat (at least, I didnt see any)
- the UI on top to navigate back and forward works well, but it's not "vivaldi-looking", so to speak. Maybe if you can find a way to "reuse" existing icons (like the forward one) in the browser it would look even better (especially if it worked with themes!)
Again, great mod. Congrats!
-
@MasterLeo29 Thank you very much! This are some nice suggestions. I've updated the code and the first post. Now stacked dialogs will look like this:
Also I've adjusted the position and look of the navigation elements. I'm using the back and forward button from Vivaldi (if available) and added a fallback. Also I added a slight background to the URL.
Let me know what you think about it.
-
@oudstand Gave it a new test. The stacked dialogs do look nice. As for the "menu" changes, took me a while to "find" the menu because it was "hidden" when I tested it on my "big" monitor.
The main div you create for the items (the one with the on hover effect) has a "margin-top: 3.5%" that, on my monitor, made it so that the menu stood behind the dialog eheh.
Maybe changing the units from '%' to a better scaling one ? like vh (not an CSS guru, so you may want to try some stuff out)
-
@MasterLeo29 I've changed the positioning a bit. Maybe you can test it again?
-
@oudstand I can and I did! Looks fixed to me. Congrats once more
Edit : I'm even adding this one to my daily driver
-
Works great. Thanks for sharing
-
@oudstand While using it today, I noticed an odd bug. When using the Ctrl+Alt+Middle mouse click to open in dialog, it was opening two dialogs of the same url.
After a bit of debugging, I think I have a fix for you to test/include.
on your 'setUrlClickObserver', when adding the mousedown event listener, on the first if statement I added a 'return' so that it would not trigger the "show dialog" a second time
something like this snippet :
// Check if the Ctrl key, Alt key, and middle mouse button were pressed if ( event.ctrlKey && event.altKey && (event.button === 0 || event.button === 1) ) { showDialog(event); return; }
Hope it helps
-
@MasterLeo29 said in Open in Dialog mod:
@oudstand While using it today, I noticed an odd bug. When using the Ctrl+Alt+Middle mouse click to open in dialog, it was opening two dialogs of the same url.
After a bit of debugging, I think I have a fix for you to test/include.
on your 'setUrlClickObserver', when adding the mousedown event listener, on the first if statement I added a 'return' so that it would not trigger the "show dialog" a second time
something like this snippet :
// Check if the Ctrl key, Alt key, and middle mouse button were pressed if ( event.ctrlKey && event.altKey && (event.button === 0 || event.button === 1) ) { showDialog(event); return; }
Hope it helps
Oh good idea. You probably click slower than I do
-
@oudstand
Nicely done! May I use this script to complement my Vivaldi Custom UI Mod? Of course with full credits. -
@srazzano4 Yes, feel free to use.
-
Thank you. Posted my Vivaldi Custom Mod on my Github page https://github.com/Razzano/Vivaldi_Custom with your script attached minus the search functions since it duplicates the Apps' Search With contextmenuitem.
-
@srazzano4 said in Open in Dialog mod:
minus the search functions since it duplicates the Apps' Search With contextmenuitem.
That's right a similar functionality already exists just without the dialog option
-
@oudstand
I tried installing the mod and there was an issue with my google searchYour file was not found
After some debugging it seems to be due to the url configuration for my google search, this is the url I use:
{google:baseURL}search?q=%s&{google:originalQueryForSuggestion}{google:prefetchSource}{google:sourceId}{google:contextualSearchVersion}ie={inputEncoding}
And to get the correct url I also found the function
vivaldi.searchEngines.getSearchRequest('16', 'test', console.log)
-
@tam710562 You're right this was failing. I've updated the code. Thanks for helping
-
Ok, got it.
-
@srazzano4 Please, post code in Code-Blocks! the </> button!
https://commonmark.org/help/tutorial/09-code.html -
@srazzano4 I think with the current version of the mod, the google search should work. Do you still have a problem?
-
OK, got it.
-
@srazzano4 I've updated the
dialogTabSearch
function. I've tested it with this URLhttps://www.google.de/search?q=%s
and the URL provided by @tam710562
{google:baseURL}search?q=%s&{google:originalQueryForSuggestion}{google:prefetchSource}{google:sourceId}{google:contextualSearchVersion}ie={inputEncoding}