aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2017-07-05 16:47:00 +0530
committerArun Isaac2017-07-05 16:55:57 +0530
commitfb27d6ce818f5dd2836c2a48ce825a7649a55f9c (patch)
treed897c0fda684fdaefc45e5fa53e92f2aaf9b927d
parent1975ec8116eaafb83f397121b0fb19a6960c2d8e (diff)
downloadyoutube-noscript-shim-fb27d6ce818f5dd2836c2a48ce825a7649a55f9c.tar.gz
youtube-noscript-shim-fb27d6ce818f5dd2836c2a48ce825a7649a55f9c.tar.lz
youtube-noscript-shim-fb27d6ce818f5dd2836c2a48ce825a7649a55f9c.zip
Remove "Get video link" feature.
* viewtube.js (createMyPlayer): Remove panel "Get" button. (createMyElement): Remove handling of "get" action. (getMyVideo): Remove function. (option): Remove "autoget". Users can get the video link from the HTML5 video element.
-rw-r--r--viewtube.js39
1 files changed, 1 insertions, 38 deletions
diff --git a/viewtube.js b/viewtube.js
index 3af404d..dda3e99 100644
--- a/viewtube.js
+++ b/viewtube.js
@@ -30,7 +30,7 @@
// Player
var player = {};
- var option = {'autoplay': false, 'autoget': false, 'definition': 'HD', 'container': 'MP4', 'dash': false, 'direct': false, 'widesize': false, 'fullsize': false};
+ var option = {'autoplay': false, 'definition': 'HD', 'container': 'MP4', 'dash': false, 'direct': false, 'widesize': false, 'fullsize': false};
var mimetypes = {
'MPEG': 'video/mpeg',
'MP4': 'video/mp4',
@@ -83,10 +83,6 @@
if (target == 'video') {
obj.addEventListener('change', function() {
player['videoPlay'] = this.value;
- if (player['isGetting']) {
- modifyMyElement(player['buttonGet'] , 'div', 'Get', false);
- player['isGetting'] = false;
- }
if (player['isPlaying']) playMyVideo(option['autoplay']);
}, false);
}
@@ -100,9 +96,6 @@
case 'play':
playMyVideo(!player['isPlaying']);
break;
- case 'get':
- getMyVideo();
- break;
case 'autoplay':
option['autoplay'] = !option['autoplay'];
styleButton('buttonAutoplay', option['autoplay']);
@@ -224,12 +217,6 @@
if (option['autoplay']) styleMyElement(player['buttonAutoplay'], {color: '#008080', textShadow: '0px 1px 1px #CCCCCC'});
player['playerPanel'].appendChild(player['buttonAutoplay']);
- /* Panel Get Button */
- player['buttonGet'] = createMyElement('div', 'Get', 'click', 'get', '');
- player['buttonGet'].title = '{Get: click to download the selected video format}';
- styleMyElement(player['buttonGet'], {height: panelItemHeight + 'px', border: '1px solid #CCCCCC', borderRadius: '3px', padding: '0px 5px', display: 'inline', color: '#C000C0', fontSize: '12px', textShadow: '0px 1px 1px #CCCCCC', cursor: 'pointer'});
- player['playerPanel'].appendChild(player['buttonGet']);
-
/* Panel DASH Button */
player['buttonDASH'] = createMyElement('div', 'MD', 'click', 'dash', '');
player['buttonDASH'].title = '{MPEG-DASH: click to enable/disable DASH playback using the HTML5 video player (experimental)}';
@@ -352,29 +339,6 @@
}
}
- function getMyVideo() {
- var vdoURL = player['videoList'][player['videoPlay']];
- if (vdoURL == 'DASH') return;
- if (vdoURL == page.url) return;
- if (player['videoTitle']) {
- var vdoD = ' (' + player['videoPlay'] + ')';
- vdoD = vdoD.replace(/Ultra High Definition/, 'UHD');
- vdoD = vdoD.replace(/Full High Definition/, 'FHD');
- vdoD = vdoD.replace(/High Definition/, 'HD');
- vdoD = vdoD.replace(/Standard Definition/, 'SD');
- vdoD = vdoD.replace(/Very Low Definition/, 'VLD');
- vdoD = vdoD.replace(/Low Definition/, 'LD');
- vdoD = vdoD.replace(/\sFLV|\sMP4|\sWebM|\s3GP/g, '');
- vdoURL = vdoURL + '&title=' + player['videoTitle'] + vdoD;
- }
- if (option['autoget'] && player['videoPlay'] == 'High Definition MP4') page.win.location.href = vdoURL;
- else {
- var vdoLink = 'Get <a href="' + vdoURL + '" style="color:#00892C">Link</a>';
- modifyMyElement(player['buttonGet'] , 'div', vdoLink, false);
- player['isGetting'] = true;
- }
- }
-
function resizeMyPlayer(size) {
switch (size) {
case 'widesize':
@@ -945,7 +909,6 @@
/* DVL */
ytVideoList['Direct Video Link'] = page.url;
- option['autoget'] = true;
ytPlayer();
}
else {