28 Updates for Patches
[webos-internals:modifications.git] / youtube / youtube-copy-url-to-clipboard.patch
1 diff --git a/usr/palm/applications/com.palm.app.youtube/app/controllers/video-assistant.js b/usr/palm/applications/com.palm.app.youtube/app/controllers/video-assistant.js
2 index 99701ce..cccfde7 100644
3 --- a/usr/palm/applications/com.palm.app.youtube/app/controllers/video-assistant.js
4 +++ b/usr/palm/applications/com.palm.app.youtube/app/controllers/video-assistant.js
5 @@ -77,6 +77,10 @@ var VideoAssistant = Class.create({
6                                                 }})
7                                 event.stop(event);
8                         }       
9 +                       else if (event.command == 'clipboard' && this.video.shareLink && this.video.shareLink != "") {
10 +                               this.controller.stageController.setClipboard(this.video.shareLink);
11 +                               event.stop(event);
12 +                       }
13                         else {
14                                 AppAssistant.common.handleCommand(event);       
15                         }
16 @@ -92,7 +96,8 @@ var VideoAssistant = Class.create({
17         shareMenuModel: {label: $L('Share'), 
18                                         items: [
19                                                 {label: $L('Email'), command:'email'}, 
20 -                                               {label: $L('Text Message'), command:'msg' }
21 +                                               {label: $L('Text Message'), command:'msg'},
22 +                                               {label: $L('Copy URL to Clipboard'), command:'clipboard' }
23                                         ]},
24         
25  });