codemirror
3 years ago
datatables
3 years ago
admin-page.js
3 years ago
custom-admin-menu.js
3 years ago
hide-admin-notices.js
3 years ago
jBox.all.min.js
3 years ago
jquery.jsticky.mod.js
3 years ago
jquery.jsticky.mod.min.js
3 years ago
js.cookie.min.js
3 years ago
media-replace.js
3 years ago
public.js
3 years ago
toggle-hidden-menu.js
3 years ago
public.js
30 lines
| 1 | (function( $ ) { |
| 2 | 'use strict'; |
| 3 | |
| 4 | $(document).ready( function() { |
| 5 | |
| 6 | // console.log( phpVars ); |
| 7 | |
| 8 | // When External Permalinks is enabled, remove #new_tab from external permalinks and set target to _blank |
| 9 | if ( phpVars.externalPermalinksEnabled ) { |
| 10 | |
| 11 | $("a").each(function() { |
| 12 | var url = $(this).attr("href"); |
| 13 | var target = $(this).attr("target"); |
| 14 | |
| 15 | if ( url != null ) { |
| 16 | if ( url.indexOf("#new_tab") >= 0 ) { |
| 17 | url = url.replace("#new_tab", ""); |
| 18 | target = "_blank"; |
| 19 | } |
| 20 | $(this).attr("href", url); |
| 21 | $(this).attr("target", target); |
| 22 | } |
| 23 | |
| 24 | }); |
| 25 | |
| 26 | } |
| 27 | |
| 28 | }); |
| 29 | |
| 30 | })( jQuery ); |