[Solved] Developing an browser extension on Vivaldi is impossible?
-
Hello,
I tried to develop a chrome extension, while relying on Vivaldi to visualize and test its operation. Unfortunately, I encountered a strange problem that seems to affect only Vivaldi (not Chrome for example).
/manifest.json
{ "manifest_version": 2, "name": "name", "description": "description", "version": "0.0.1", "author" : "author", "icons": { "128": "img/icon128.png" }, "browser_action": { "default_popup": "popup.html" }, "background": { "scripts": [ "js/jquery.min.js", "js/popup.js" ] }, "permissions": [ "notifications", "tabs", "storage" ] }
/popup.html
<!DOCTYPE html> <meta charset="UTF-8"> <html> <body> <select multiple class="form-control" id="languages"> <option value="en">English</option> <option value="fr">Français</option> <option value="da">Dansk</option> <option value="de">Deutsch</option> <option value="es">Español</option> <option value="it">Italiano</option> <option value="hu">Magyar</option> <option value="nl">Nederlands</option> <option value="no">Norsk</option> <option value="pl">Polski</option> <option value="pt">Português</option> <option value="sk">Slovenčina</option> <option value="fi">Suomi</option> <option value="sv">Svenska</option> <option value="vi">Tiếng Việt</option> <option value="tr">Türkçe</option> <option value="cs">Čeština</option> <option value="el">Ελληνικά</option> <option value="bg">Български</option> <option value="ru">Русский</option> <option value="ar">العربية</option> <option value="th">ภาษาไทย</option> <option value="zh">中文</option> <option value="zh-hk">中文(粵語)</option> <option value="ja">日本語</option> <option value="ko">한국어</option> <option value="asl">American Sign Language</option> <option value="other">Other</option> </select> <script src="js/jquery.min.js"></script> <script src="js/popup.js"></script> </body> </html>
/js/popup.js
console.log("step 1") $(function(){ console.log("step 2") console.log("select length : " + $("select").length); $("select").on("click", function(){ console.log("STEP 3") alert("STEP 3") }); });
I'm loading my extension via Loading Unpacked Extension. On Google Chrome in developer mode, you can right-click on the icon of the extension, and in the context menu, there is an option to launch the inspection console for the popup.
But on Vivaldi, this option does not exist. Strange.Second strange event, with my code, when you click on the list of languages, you should see an alert, under Google Chrome (with Unpacked Extension) it runs correctly, but on Vivaldi it does not run.
For both reasons, I am forced to abandon Vivaldi and continue the development of my extension on Google Chrome, do you have a solution?
-
@glaived Hard to tell without trying the extension. Where does the popup run, on the vivaldi extension page? I can inspect there, and have done so in the past.
-
@luetage said in Developing an browser extension on Vivaldi is impossible?:
@glaived Hard to tell without trying the extension. Where does the popup run, on the vivaldi extension page? I can inspect there, and have done so in the past.
On any page, when I right click on the button of my extension, I do not have the pop-up inspector option in the context menu. I hope I understand your question.
-
Nah, I think I don't understand you.
Reading this I assume your extension has a browseraction button in the address bar, which launches a popup for your extension. And you want to inspect the popup by right clicking the browseraction button? Why don't you open the popup with a left-click on the extension button and a right-click/inspect on the popup?
-
Trying with one of the extensions I have installed, if I open the popup and right-click it I can use the "inspect" menu item. Is that not available for you?
-
@luetage said in Developing an browser extension on Vivaldi is impossible?:
Nah, I think I don't understand you.
Reading this I assume your extension has a browseraction button in the address bar, which launches a popup for your extension. And you want to inspect the popup by right clicking the browseraction button? Why don't you open the popup with a left-click on the extension button and a right-click/inspect on the popup?
Oh yeah ok. Yes i have a icon of my extension in the address bar for launches a popup.
-> Why don't you open the popup with a left-click on the extension button and a right-click/inspect on the popup?
This solution work, It's different with Google Chrome.With GChrome.
Thanks for your help.
-
-