Created
April 28, 2016 16:28
-
-
Save artisanalcode/a3c68494380ff5ac5add1dfe87328138 to your computer and use it in GitHub Desktop.
Executes code conditionally based on URL.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Checks current URL, executes specified content only on non-"blacklisted" URLs. | |
*/ | |
(function () { | |
if (!/^\/url-segment-here>|^\/another-url-segment-here|^\/as-many-url-segments-as-needed-here/.test(window.location.pathname)) { | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment