Skip to content

Commit c2fd958

Browse files
authored
Merge pull request #33 from samperrow/dev-1.6.42
1.6.42
2 parents 52fe889 + 1b2e5f9 commit c2fd958

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Pre* Party Resource Hints
44
* Plugin URI: https://wordpress.org/plugins/pre-party-browser-hints/
55
* Description: Take advantage of the browser resource hints DNS-Prefetch, Prerender, Preconnect, Prefetch, and Preload to improve page load time.
6-
* Version: 1.6.41
6+
* Version: 1.6.42
77
* Requires at least: 4.4
88
* Requires PHP: 5.3
99
* Author: Sam Perrow

js/find-external-domains.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
var scripts = document.getElementsByTagName('script');
33
var host = document.location.origin;
44

5-
function sanitizeURL(url) {
6-
return url.replace(/[\[\]\{\}\<\>\'\"\\(\)\*\+\\^\$\|]/g, '');
5+
function sanitizeURL() {
6+
return this.replace(/[\[\]\{\}\<\>\'\"\\(\)\*\+\\^\$\|]/g, '');
77
}
88

99
function findResourceSources() {
@@ -14,7 +14,7 @@
1414
var protocolAndDomain = newStr[0] + '//' + newStr[2];
1515

1616
if (protocolAndDomain !== host && hint_data.url.indexOf(protocolAndDomain) === -1) {
17-
hint_data.url.push(sanitizeURL(protocolAndDomain));
17+
hint_data.url.push(sanitizeURL.call(protocolAndDomain));
1818
}
1919
}
2020
}
@@ -26,7 +26,6 @@
2626
var xhr = new XMLHttpRequest();
2727
xhr.open('POST', host + '/wp-admin/admin-ajax.php', true);
2828
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');
29-
console.log(hint_data.url);
3029
var json = JSON.stringify(hint_data);
3130
xhr.send('action=pprh_post_domain_names&hint_data=' + json + '&nonce=' + hint_data.nonce );
3231
}, 7000);

readme.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Contributors: samperrow
33
Donate link: https://www.paypal.me/samperrow
44
Tags: W3C, DNS prefetch, prerender, preconnect, prefetch, preload, web perf, performance, speed, resource hints
55
Requires at least: 4.4
6-
Tested up to: 5.2.3
7-
Stable tag: 1.6.41
6+
Tested up to: 5.3.0
7+
Stable tag: 1.6.42
88
Requires PHP: 5.3.0
99
License: GPLv2 or later
1010
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -82,8 +82,12 @@ To activate the preloaded resource, you must call that file in HTML as you would
8282

8383
== Changelog ==
8484

85-
1. Most recent update: October 5, 2019.
86-
2. Version 1.6.41
85+
1. Most recent update: November 4, 2019.
86+
2. Version 1.6.42
87+
88+
November 4, 2019:
89+
1) Ensured compatibility with WP 5.3
90+
2) Removed debug console.log message on find-external-domains.js; other minor change to that file.
8791

8892
October 5, 2019:
8993
1) Entered URL's will no longer be converted to lower case. This is because some sites have case-sensitive URI's.

0 commit comments

Comments
 (0)