]> git.mxchange.org Git - friendica.git/commitdiff
Move urlRegex JS constant to main.js
authorHypolite Petovan <hypolite@mrpetovan.com>
Fri, 11 Oct 2019 19:27:05 +0000 (15:27 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Fri, 11 Oct 2019 23:59:28 +0000 (19:59 -0400)
view/js/linkPreview.js
view/js/main.js

index c01856384888418080f483d7faa54f56de1462ca..09493eebad3d1e4066e40358bd66390c214e42b4 100644 (file)
@@ -52,7 +52,6 @@
                        <div class="clear"></div>\
                        <hr class="previewseparator">';
                var text;
-               var urlRegex = /^(?:https?\:\/\/|\s)[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})(?:\/+[a-z0-9_.\:\;-]*)*(?:\?[\&\%\|\+a-z0-9_=,\.\:\;-]*)?(?:[\&\%\|\+&a-z0-9_=,\:\;\.-]*)(?:[\!\#\/\&\%\|\+a-z0-9_=,\:\;\.-]*)}*$/i;
                var binurl;
                var block = false;
                var blockTitle = false;
index e2cee43d54464c12b0d07707c208d3ff5a293437..7e84a08d87b4b2e2fef0c2e3bb43546fcb1481a2 100644 (file)
@@ -86,6 +86,8 @@ var last_popup_menu = null;
 var last_popup_button = null;
 var lockLoadContent = false;
 
+const urlRegex = /^(?:https?:\/\/|\s)[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})(?:\/+[a-z0-9_.:;-]*)*(?:\?[&%|+a-z0-9_=,.:;-]*)?(?:[&%|+&a-z0-9_=,:;.-]*)(?:[!#\/&%|+a-z0-9_=,:;.-]*)}*$/i;
+
 $(function() {
        $.ajaxSetup({cache: false});