获取 SkyDrive 的文件外链固定地址

javascript:
var id = window.selfPageData.currentItemHash.replace('#resId/',''); 
var fileName = document.title.replace(' - Windows Live', '');
var downloadURL = 'http://storage.live.com/items/' + id + '?filename=' 
                + fileName;
var div = document.getElementById("content");
div.innerHTML = '<input type="text" style="width:100%" value="' + downloadURL + '">'
               + '<br/>' + div.innerHTML;
window.clipboardData.setData('Text', downloadURL);
void(0);  

 

  可将以下代码添加到收藏夹中

  Get SkyDrive downloadURL

javascript: void((function(){var id = window.selfPageData.currentItemHash.replace('#resId/',''); var fileName = document.title.replace(' - Windows Live', ''); var downloadURL = 'http://storage.live.com/items/' + id + '?filename=' + fileName; var div = document.getElementById("content"); div.innerHTML = '<input type="text" style="width:100%" value="' + downloadURL + '">' + '<br/>' + div.innerHTML; window.clipboardData.setData('Text', downloadURL);})());

   

你可能感兴趣的:(JavaScript,windows)