How to check url


#1

How To Check Url from new-windows :face_with_thermometer:
example
if http://s25.onlinevideoconverter.com/
win.show
else
not show


#2

Hi,

Electron framework is easy to learn. Well, read the documentation.
I had answer for you How to get url from new-window?

Example
In your index.html

<webview id="webview_1"></webview>

In your index.js

webview = document.getElementById("webview_1")
    webview.addEventListener('new-window', (res) => { //When electron want open new Window
                        newURL = res.url //get URL webview
                        if(newURL=="http://s25.onlinevideoconverter.com/") {
                            ...
                         }
                        else{
                             return 0
                        }
   })

#3

Then if Check domain only
how to check this ?
http://s25.onlinevideoconverter.com/” + . ?


#4

You have several solutions.
I suggest you use RegExp

if(/^http([s]?):\/\/s25.onlinevideoconverter.com/g.test(newURL))