Closed mortyobnoxious closed 2 years ago
Works fine for me and I don't think anything has changed in the copying portion of the script in a while. Can you share where this occurs?
I think it has something to do with my regex:
(Watch Free ?| ?Full Movies Online HD ?| ?İzle ?\/ ?.+ İzle| ?İzle)
After removing parenthesis, it worked. Like this:
Watch Free ?| ?Full Movies Online HD ?| ?İzle ?\/ ?.+ İzle| ?İzle
Sorry for the inconvenience.
But now, my regex doesn't work.
I tested regex, there seems to be no problem:
Can't use this with the extension.
Yeah, I think the regex parser in the addon messes up with slashes and parentheses maybe. Weird that it broke now since there were no changes to the regex code since then. I'll see if anything can be done.
I lost my regex setting after the update and tried to create the same one as before but I think I also messed it up.
I removed backslash and slash (\/). Use it like this without a problem.
/Watch Free ?| ?Full Movies Online HD ?| ?İzle ?/gi
Yeah it's the slashes. In the next version I'll just parse it as is without trying to detect groups (just the string without //gi).
I've simplified regex parsing in v2.10.15 to minimize further problems. Let me know if it works fine for you now as a string.
I don't know if the mistake is on my end but it stills gives an error like this:
regex is this:
?İzle ?_ ?.+ İzle
and I also tried with this:
?İzle ?\/ ?.+ İzle
This was working before, now this is not working, too:
?- NBA, MMA, UFC, Boxing, NFL Sports HD Streams - Weakstreams|Watch Free ?| ?Full Movies Online HD ?| ?İzle ?|Happening now_ ?|_|Watch ?| ?full HD on 1movieshd.com Free| ?Live Streams
In that case I've no clue why it breaks. Might be an issue with the regex itself, but I know next to nothing about regular expressions, so I'm of no help in that regard. I might add some validator to the options to make things a bit clearer.
var code = "https://abc.abcdefg.com/hls2/04/00008/abcdef/master.m3u8?t=abcdef&s=abcdef&e=abc&f=abc&srv=ss1&pp=abcd&i=0.0&sp=0#\Prisoners of the Ghostland İzle _ Hayalet Ülkenin Tutsakları İzle;https://abc.abcdefg.com/embed-abc.html;https://abc.abcdefg.com/embed-abc.html"
var regexCommand = " ?İzle ?_ ?.+ İzle"
var regexReplace = ""
code = code.replace(new RegExp(regexCommand, ""), regexReplace || "");
console.log(code);
I get this from extensions popup.js file, added variables myself and tried it on console. It works without a problem. I don't know what is the problem.
I don't know what is the problem.
It's the space in your regexCommand string. ?
tests for the previous token in the string, therefore it works because the space is there.
Actually that space was always there but Github trims it if i put it in code and start with space.
If i put that regex (with space, just like js code above) on the extension, it doesn't work but it works on the console.
That's because all trailing spaces at the beginning and end of input fields get trimmed. I'll have to add an exception for that.
Sorry I misunderstood you above. I didn't know it was getting trimmed. Yeah, I think that's the problem. When I remove that space from the variable on the console, it gives the same error because there's nothing preceding the ?
.
On the extension I edited my regex (removed trailing spaces and quantifier(?
)), it works without a problem.
@rowrawer By the way can you put global flag to regex
code = code.replace(new RegExp(regexCommand, "g"), regexReplace || "");
or put an option for global and case insensitive flags to options page.
I can't really be bothered to add even more options but I've already added the global flag to the command, it'll be available in the next version.
I have a user-defined command like this:
%url%#\%tabtitle%;%referer%;%origin%
When I click filename to copy with user-defined command above.
I got this error on the console after the update: