briank

Fix KKP Download Intra-Page Fragment Links

Jun 19th, 2021 (edited)
600
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. /*
  3.  * Fix intra-page fragment links for KCSG Kartra Pages Download mode
  4.  * (Place in Settings > Tracking > FOOTER tracking)
  5.  */
  6. jQuery(function () {
  7. jQuery('a[target="_self"][href^="#"]').each(function (ind, el) {
  8. for (var attr of ['protocol', 'host', 'pathname', 'search']) el[attr] = location[attr];
  9. });
  10. });
  11. </script>
RAW Paste Data