aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2017-07-06 16:47:38 +0530
committerArun Isaac2017-07-06 21:10:37 +0530
commite95068d4b89801ec4f174840bbc91ebc3b3c3273 (patch)
tree8e07f89ffdf9462fd8c80e5031b9e12edb879df1
parente4b509a4777f44b272ed555e0cded2a3a34ebb4b (diff)
downloadyoutube-noscript-shim-e95068d4b89801ec4f174840bbc91ebc3b3c3273.tar.gz
youtube-noscript-shim-e95068d4b89801ec4f174840bbc91ebc3b3c3273.tar.lz
youtube-noscript-shim-e95068d4b89801ec4f174840bbc91ebc3b3c3273.zip
Remove "DASH" button.
* viewtube.js (option): Remove "dash". (createMyElement): Remove handling of "dash" action. (createMyPlayer): Remove panel "DASH" button.
-rw-r--r--viewtube.js21
1 files changed, 2 insertions, 19 deletions
diff --git a/viewtube.js b/viewtube.js
index 0b0f308..86c9ecf 100644
--- a/viewtube.js
+++ b/viewtube.js
@@ -30,7 +30,7 @@
// Player
var player = {};
- var option = {'definition': 'HD', 'container': 'MP4', 'dash': false, 'direct': false};
+ var option = {'definition': 'HD', 'container': 'MP4', 'direct': false};
var mimetypes = {
'MPEG': 'video/mpeg',
'MP4': 'video/mp4',
@@ -50,9 +50,6 @@
// ==========Functions========== //
function createMyElement(type, content, event, action, target) {
- function styleButton (button, state) {
- styleMyElement(player[button], state ? {color: '#008080', textShadow: '0px 1px 1px #CCCCCC'} : {color: '#CCCCCC', textShadow: '0px 0px 0px'});
- }
var obj = page.doc.createElement(type);
if (content) {
switch (type) {
@@ -93,11 +90,6 @@
case 'close':
page.body.removeChild(target);
break;
- case 'dash':
- option['dash'] = !option['dash'];
- styleButton('buttonDASH', option['dash'])
- setMyOptions('dash', option['dash']);
- break;
}
}, false);
}
@@ -163,19 +155,10 @@
styleMyElement(player['videoItem'], {padding: '0px', display: 'block', color: '#336699', fontSize: '12px', textShadow: '0px 1px 1px #CCCCCC', cursor: 'pointer'});
if (videoCode.indexOf('Video') != -1 || videoCode.indexOf('Audio') != -1) styleMyElement(player['videoItem'], {color: '#8F6B32'});
if (player['videoList'][videoCode] == 'DASH') styleMyElement(player['videoItem'], {color: '#CF4913'});
- if (player['videoList'][videoCode] != 'DASH' || option['dash'])
- player['videoMenu'].appendChild(player['videoItem']);
- else delete player['videoList'][videoCode];
+ player['videoMenu'].appendChild(player['videoItem']);
if (videoCode == 'Direct Video Link') styleMyElement(player['videoItem'], {color: '#00C0C0'});
}
- /* 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)}';
- styleMyElement(player['buttonDASH'], {height: panelItemHeight + 'px', border: '1px solid #CCCCCC', borderRadius: '3px', padding: '0px 5px', display: 'inline', color: '#CCCCCC', fontSize: '12px', cursor: 'pointer'});
- if (option['dash']) styleMyElement(player['buttonDASH'], {color: '#008080', textShadow: '0px 1px 1px #CCCCCC'});
- player['playerPanel'].appendChild(player['buttonDASH']);
-
/* The Content */
player['contentWidth'] = player['playerWidth'];
player['contentHeight'] = player['playerHeight'] - player['panelHeight'] - player['panelPadding'] * 2;