Skip to content

Instantly share code, notes, and snippets.

@edlvj
Created March 7, 2016 08:52
Show Gist options
  • Save edlvj/e4dc68bd3033605bbae8 to your computer and use it in GitHub Desktop.
Save edlvj/e4dc68bd3033605bbae8 to your computer and use it in GitHub Desktop.
<!doctype html>
</html>
<head>
<meta charset="utf-8">
</head>
<body>
<p>Ссылка: <input id="link" type="text" name="link" /> //пример: https://drive.google.com/folderview?id=0B6DzV6aI-G3Vd093azJTUGVaYVU&usp=sharing</p>
<button onclick="update()" /> Получить новую ссылку</button>
<h3 id="res"></h3>
<script>
function update() {
var x = document.getElementById("link").value;
var y = x.substring(39, 67);
var z = 'https://googledrive.com/host/' + y;
document.getElementById('res').innerHTML = z;
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment