-
-
Save dhst/94b0dceb455124e6da75 to your computer and use it in GitHub Desktop.
Bookmarklet for own3d.tv-VODs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:var%20src,URLbaseArr,URLbase,pListData,urlStd,urlHD,urlStdStr,urlHDStr,queryStr;src%20=%20document.getElementsByTagName(%27html%27)[0].innerHTML;URLbaseArr%20=%20strVonBis(src,%22clip:%20{%22,%22plugins:%20{%22);URLbase%20=%20strVonBis(URLbaseArr,%22baseUrl:%22,%22scaling:%22);pListData%20=%20strVonBis(src,%22playlist:%20[{%22,%22play:%20{%22);queryStr%20=%20strVonBis(src,%22queryString:%20escape(%27%22,%22&ec_seek=%22);urlStd%20=%20strVonBis(pListData,%22url:%22,%22,%22);urlHD%20=%20strVonBis(pListData,%22HDUrl:%22,%22HQUrl%22);URLbase%20=%20URLbase.replace(%22baseUrl:%22,%20%22%22);queryStr%20=%20queryStr.replace(%22queryString:%20escape(%27%22,%22%22);urlStd%20=%20urlStd.replace(%22url:%22,%20%22%22);queryStr%20=%20strReplaceSpecial(queryStr);urlStdStr%20=%20strReplaceSpecial(URLbase%20+%20urlStd);urlStdStr%20=%20urlStdStr%20+%20queryStr;if%20(urlHD%20==%20false)%20{urlHDStr%20=%20%22%22;}%20else%20{urlHD%20=%20urlHD.replace(%22HDUrl:%22,%20%22%22);urlHDStr%20=%20strReplaceSpecial(URLbase%20+%20urlHD);urlHDStr%20=%20urlHDStr%20+%20queryStr;}alert(%22own3d.tv%20Video-URLs:\n\n%22%20+%20urlStdStr%20+%20%22\n\n%22%20+%20urlHDStr);function%20strVonBis(strInput,strStart,strEnde)%20{var%20posStart%20=%20strInput.indexOf(strStart);if%20(posStart%20==%20-1)%20{return%20false;}%20else%20{var%20posEnde%20=%20strInput.indexOf(strEnde);var%20posLength%20=%20posEnde%20-%20posStart;var%20strOutput%20=%20strInput.substr(posStart,posLength);return%20strOutput;}}function%20strReplaceSpecial(strInput)%20{var%20strOutput;strOutput%20=%20strInput.replace(/%27/g,%27%27);strOutput%20=%20strOutput.replace(/\n/g,%27%27);strOutput%20=%20strOutput.replace(/\r/g,%27%27);strOutput%20=%20strOutput.replace(/\t/g,%27%27);strOutput%20=%20strOutput.replace(/\s/g,%27%27);strOutput%20=%20strOutput.replace(/,/g,%27%27);return%20strOutput;} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment