Safari Extensions for Safari

Is it possible for the link to work in Safari? I have done almost everything that I can think of, but it seems that adding links to popovers only changes the appearance and does not lead to anything clickable with href or onclick.

+6
source share
2 answers

You can add onclick listener on href or div

.onclick = safari.application.activeBrowserWindow.openTab().url = "http://www.yourdomain.com/"; 
+7
source
 var link = document.querySelector('#~~~'); link.addEventListener("click", function(event) { safari.application.activeBrowserWindow.openTab().url = "http://~~" }) 
0
source

Source: https://habr.com/ru/post/913375/


All Articles