Skip to content

Instantly share code, notes, and snippets.

@botmtl
Last active October 26, 2018 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save botmtl/3bc9b31abc7d176fdd2f8e29b3e6d961 to your computer and use it in GitHub Desktop.
Save botmtl/3bc9b31abc7d176fdd2f8e29b3e6d961 to your computer and use it in GitHub Desktop.
MyVidster.bookmarklet.js
javascript:(function MyVidsterBookMark() {
var documentStr = document.documentElement.innerHTML;
documentStr = documentStr.replace(/\n\r|\r\n|\n|\r|\t/g, '')
.match(/<title.*?title>|<frameset.*?frameset>|<link.*?>|<meta.*?>|<embed.*?>|<iframe.*?>|<video.*?video>|<video.*?>|<object.*?object>|<object.*?>|&lt;embed.*?&gt;|&lt;iframe.*?&gt;|&lt;video.*?video&gt;|&lt;video.*?&gt;|&lt;object.*?object&gt;|&lt;object.*?&gt;/ig);
documentStr = documentStr.toString();
let bar = `
<div class="momane_topbar" style="position: fixed;top: 0;left: 0;width: 100%; height: 50px;
background-color: #6C3;color:white;display: block;font-size: 18px;font-weight: bolder;z-index: 6553534;text-align: center;line-height: 48px;">
Sit tight, We are processing your request. Page will be redirected when done.</div>
<div style="display:none">
<form id="myvidsterform" action="https://www.myvidster.com/user/quickadd.php?p=1&ver=2&l=${encodeURIComponent(window.location.href)}" method="post">
<input name="c" type="hidden" value="${documentStr}">
</form>
</div>`;
document.documentElement.insertAdjacentHTML('afterbegin', bar);
document.getElementById("myvidsterform").submit();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment