Fix regex to support intel links that do not have www (e.g. http://ingress.com/intel).

This commit is contained in:
Snedecor, David
2016-10-17 11:25:05 -05:00
parent a384b21ed0
commit ef6f1d0ed6

View File

@ -439,7 +439,7 @@ window.plugin.drawTools.optPaste = function() {
try { try {
// first see if it looks like a URL-format stock intel link, and if so, try and parse out any stock drawn items // first see if it looks like a URL-format stock intel link, and if so, try and parse out any stock drawn items
// from the pls parameter // from the pls parameter
if (promptAction.match(new RegExp("^(https?://)?(www\\.)ingress\\.com/intel.*[?&]pls="))) { if (promptAction.match(new RegExp("^(https?://)?(www\\.)?ingress\\.com/intel.*[?&]pls="))) {
//looks like a ingress URL that has drawn items... //looks like a ingress URL that has drawn items...
var items = promptAction.split(/[?&]/); var items = promptAction.split(/[?&]/);
var foundAt = -1; var foundAt = -1;