diff options
author | FChannel <> | 2021-06-03 01:19:37 -0700 |
---|---|---|
committer | FChannel <> | 2021-06-03 01:19:37 -0700 |
commit | 9d937e6f895ca7213ae759efca9b292a1d014ab3 (patch) | |
tree | eecfbe1c593afc5c1c2e4017a109cfb94a51a014 /static/js | |
parent | 60b6bdf1c021fcffff397c7b1439a1407ed90f0a (diff) |
cleaning up removing posts
Diffstat (limited to 'static/js')
-rw-r--r-- | static/js/posts.js | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/static/js/posts.js b/static/js/posts.js index b2bfd7a..077b654 100644 --- a/static/js/posts.js +++ b/static/js/posts.js @@ -26,6 +26,8 @@ function shortURL(actorName, url) { re = /.+\//g; temp = re.exec(url) + + var output if(stripTransferProtocol(temp[0]) == stripTransferProtocol(actorName) + "/") { @@ -39,11 +41,8 @@ function shortURL(actorName, url) re = /\w+$/g; - u = re.exec(short); - - return u; + output = re.exec(short); }else{ - var short = url.replace("https://", ""); short = short.replace("http://", ""); short = short.replace("www.", ""); @@ -64,10 +63,10 @@ function shortURL(actorName, url) v = re.exec(str) - v = "f" + v[0] + "-" + u - - return v; + output = "f" + v[0] + "-" + u } + + return output } function shortImg(url) @@ -113,7 +112,7 @@ function getBoardId(url) function convertContent(actorName, content, opid) { - var re = /(>>)(https:\/\/|http:\/\/)?(www\.)?.+\/\w+/gm; + var re = /(>>)(https?:\/\/)?(www\.)?.+\/\w+/gm; var match = content.match(re); var newContent = content; if(match) |