Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name yncUndeground
- // @description userjs for downloading theync undeground video
- // @author anon
- // @license no
- // @version 1.0
- // @include http://theync.com/*
- // ==/UserScript==
- (function(window, undefined) {
- var w;
- if (unsafeWindow != "undefined") {
- w = unsafeWindow;
- } else {
- w = window;
- }
- if (w.self != w.top) {
- return;
- }
- var refs = document.getElementsByClassName('yncHPThumbLink');
- for (var i = 0; i < refs.length; i++) {
- var img = refs[i].style['backgroundImage'];
- var vid = (img.match(/pageTN([0-9]+)/))[1];
- var ref = refs[i].href;
- var file = (ref.match(/.+\/([^\.]+)/))[1];
- refs[i].href = 'http://media.theync.com/vids/video' + vid + '.mp4';
- refs[i].download = file + '.mp4';
- }
- })(window);
Advertisement
Add Comment
Please, Sign In to add comment