Friday, 25 November 2016

Direct Link Generator CODE

Direct Link Generator CODE


-----------------------------------------------------------------------------------------------------
CODE:
-----------------------------------------------------------------------------------------------------

<html>
<head>
</head>
<!--<body>-->
<body>
<div class="main-inner-wrap">
<div class="content section" id="content"><div class="widget HTML" data-version="1" id="HTML4">
<div class="widget-content">
<gcse:searchresults></gcse:searchresults>
</div>
</div><div class="widget Blog" data-version="1" id="Blog1">
<div class="blog-posts hfeed">
<div class="date-outer">
<div class="date-posts">
<div class="post-outer">
<div class="post hentry">
<h2 class="post-title entry-title">
Direct Link Generator - Google Drive, Dropbox, Onedrive
</h2>
<div class="post-header">
<div class="post-header-line-1"></div>
</div>
<div class="post-body entry-content" id="post-body-3564729550326005689">
<style>
#linkpaste {
min-width: 95%;
font-family: Courier;
font-size: .9em;
background: #F7F7F7;
margin: 1em auto;
padding: 1em 1em 1em;
border: 1px solid #DDD;
}
#cde:focus {
border: 1px solid black;
}
.instruc {
width: 48%;
float: left;
}
.notes {
width: 48%;
float: right;
}
.instruc h2,
.notes h2 {
font-size: 1.3em;
border-bottom: 1px solid #ff7200;
padding-bottom: .2em;
margin-bottom: .3em;
}
.instruc ol,
.notes ul {
margin-left: 20px;
}
#cde {
width: 100%;
height: 25px;
padding: 0 .2em;
margin: 1em auto;
font-size: 1em;
font-family: Helvatica, sans-serif;
}
label {
font-family: Georgia;
font-size: 1.5em;
}
.block {
padding-top: 1em;
margin-bottom: 1em;
}
#but {
border-radius: 8px;
background: #32A4D6;
color: #fff;
font-family: Helvatica, Arial, Tahoma, sans-serif;
font-size: 1.2em;
padding: 5px 5px;
cursor: pointer;
margin: 0em auto 1em;
display: block;
min-width: 30%;
clear: both;
}
iframe {
margin: 0em auto 1em;
display: block;
position: relative;
max-width: 100%;
}
</style><br>
<script type='text/javascript'>
function $(id) {
return document.getElementById(id);
}
function generatelink() {
var add = $("cde").value;
var drive = add.indexOf("google.com/file/d/");
var dbox = add.indexOf("dropbox.com/s");
var odrive = add.indexOf("onedrive.live.com");
if (drive != -1) {
var start = add.indexOf("d/");
var end = add.indexOf("/view");
var reString = add.slice(start + 2, end);
var link = "https://drive.google.com/uc?export=download&id=" + reString + "";
$("linkpaste").value = link;
$("linkpaste").select();
} else if (dbox != -1) {
var link = add.replace("?dl=0", "?dl=1");
$("linkpaste").value = link;
$("linkpaste").select();
} else if (odrive != -1) {
var link = add.replace("redir", "download");
$("linkpaste").value = link;
$("linkpaste").select();
} else {
$("linkpaste").value = "THE URL IS INVALID";
}
}
window.onload = function() {
$("cde").focus();
$("but").onclick = generatelink;
};
</script>
<div class="block">
<label for="cde">Enter Share link:</label> <input id="cde" onkeydown="if (event.keyCode == 13) $('but').click()" placeholder="e.g., https://drive.google.com/file/d/0B2BtMc5vQHtXN1hjOUoxR3UxelU/view?usp=sharing" type="text"><br>
<button id="but">Generate</button> <label for="linkpaste">Direct Download link:</label> <input id="linkpaste" readonly="" type="text"></div>
<div class="instruc">
<h2>
How to create direct links with this tool?</h2>
<ol>
<li>First you must obtain the share URL.</li>
<li>Here is the <a href="" target="_blank">guide to obtain Share link</a>.</li>
<li>Paste that link in the 'Enter Share link' textbox.</li>
<li>Then, press Enter or click Generate.</li>
<li>Press Ctrl + C to copy the direct link to your clipboard.</li>
</ol>
</div>
<div class="notes">
<h2>
Important notes</h2>
<ul>
<li>You can save this page by pressing Ctrl + S and use it whenever you need.</li>
<li>This tool will work only for Google Drive, Dropbox and Onedrive links only.</li>
</ul>
</div>
<div style="clear: both;">
</div>
<div id="frameContainer">
</div>
<div style="clear: both;"></div>
</div>
<div class="post-footer">
</div>
</div>
</div>
</div></div>
</div>
<script type="text/javascript">window.___gcfg = {'lang': 'en_GB'};</script>
</div></div>
<div class="clr"></div>
</div>
</body>
</html>



















Direct Link Generator - Google Drive, Dropbox, Onedrive



How to create direct links with this tool?

  1. First you must obtain the share URL.
  2. Here is the guide to obtain Share link.
  3. Paste that link in the 'Enter Share link' textbox.
  4. Then, press Enter or click Generate.
  5. Press Ctrl + C to copy the direct link to your clipboard.

Important notes

  • You can save this page by pressing Ctrl + S and use it whenever you need.
  • This tool will work only for Google Drive, Dropbox and Onedrive links only.

0 comments:

Post a Comment

FB Gadgets | Template Designed by Fatakat PhotosCoolBThemes.com
Code by : paid web directory

https://www.google.co.uk/search?q=site%3Ablogspot.com+fbgadgets