matches the url and does something if it matches a certain string


<button onclick='get_url_modal();'>Run Function</button>


function get_url_modal() {
  var window_location = window.location.href;
  if(window_location.match(/ {
    console.log('page found...');
    // do some stuff if the page matches the window location text

Other Items in javascript
Search Code
Search Code by entering your search text above.

This is my test area for webdev. I keep a collection of code snippits here, mostly for my reference. Also if i find a good site, i usually add it here.


Random Quote
There is a qualitative and quantitative difference between a day that begins with a little exercise, a book, meditation, a good meal, a thoughtful walk, and the start of a day that begins with a smartphone in bed.