Skip to content

Commit

Permalink
Update Regexp for matching url. Thanks to @flussence
Browse files Browse the repository at this point in the history
Fix #1
  • Loading branch information
eMerzh committed Nov 19, 2015
1 parent 626178c commit 5392545
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/chrome/content/PasteMiddleAndGo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ var pasteMiddleAndGo = {
isUrl: function(e)
{
var v = new RegExp();
v.compile('^ *(([a-zA-Z-]{2,6}):\\/\\/)?(www\\.)?([a-zA-Z1-90-]{2,}\\.)+?([a-zA-Z-]{2,6})(:\\d{2,})?(\\/\\S+)* *$');
v.compile(/^\s*(([a-zA-Z-]{2,6}):\/\/)?([a-zA-Z0-9-]+\.)+?([a-zA-Z-]{2,6})(:\d{2,5})?(\/\S*)?\s*$/);
if (!v.test(e))
{
return false;
Expand Down
4 changes: 2 additions & 2 deletions src/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<Description about="urn:mozilla:install-manifest">
<em:id>PasteMiddleAndGo@eMerzh</em:id>
<em:version>0.1.4.1</em:version>
<em:version>0.1.5</em:version>
<em:name>Paste Middle And Go</em:name>
<em:description>When you hit new tab button with middle click, launch a search or the url containted in your clipboard</em:description>
<em:creator>eMerzh</em:creator>
Expand All @@ -18,7 +18,7 @@
<!-- Firefox -->
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>4.0</em:minVersion>
<em:maxVersion>7.*</em:maxVersion>
<em:maxVersion>42.*</em:maxVersion>
</Description>
</em:targetApplication>
</Description>
Expand Down

0 comments on commit 5392545

Please sign in to comment.