.test -detect if string contains a substring
.test -detect if string contains a substring
by dshilkret
HTML
<ul></ul>
JavaScript
var url = 'https://dtecho365.sharepoint.com/sites/ServiceNowDev1/_layouts/15/Doc.aspx?sourcedoc={954461de-bad2-48e9-ba4d-da43fa617e41}';
var prop = "https://dtecho365.sharepoint.com";
if (url.indexOf(prop) != -1) {
//if (url.includes("https://dtecho365.sharpoint.com")) {
console.log("true");
} else {
console.log("false");
}