Improvements :)

This commit is contained in:
Henrique Dias committed 2017-06-28 22:20:28 +01:00
1 parent 7aa6a549f9
commit 84ddad027f
21 files changed
+467 -445

No files matched your search

+4 -4
View File
@@ -1,7 +1,7 @@
var info = window.info
var $ = window.info
function convertURL (url) {
return window.location.origin + url.replace(info.baseURL + '/', info.webdavURL + '/')
return window.location.origin + url.replace($.baseURL + '/', $.webdavURL + '/')
}
function move (oldLink, newLink) {
@@ -9,8 +9,8 @@ function move (oldLink, newLink) {
let request = new window.XMLHttpRequest()
oldLink = convertURL(oldLink)
newLink = newLink.replace(info.baseURL + '/', info.webdavURL + '/')
newLink = window.location.origin + newLink.substring(info.baseURL.length)
newLink = newLink.replace($.baseURL + '/', $.webdavURL + '/')
newLink = window.location.origin + newLink.substring($.baseURL.length)
request.open('MOVE', oldLink, true)
request.setRequestHeader('Destination', newLink)