Created
June 7, 2017 09:36
-
-
Save Sarapulov/b91e751e84270641ffadfe05bb076de2 to your computer and use it in GitHub Desktop.
Advanced HC redirect script to the specific form
This file contains hidden or 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
<script type="text/javascript"> | |
(function(f, l, lh, isR){ // redirect to ticket form page if not already form page, requests page or article page | |
f = 151485, l = window.location, lh = l.href, isR = !(l.search.match("ticket_form_id") || lh.indexOf('/requests') > -1 || lh.indexOf('/articles') > -1); | |
if (isR {{#if signed_in}}&& false{{/if}}) l.replace("/hc/"+document.getElementsByTagName("html")[0].lang.toLowerCase()+"/requests/new?ticket_form_id="+f); | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment