Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- copy: function() {
- this.controller.stageController.setClipboard(this.tweet.stripped,true);
- banner('Copied tweet to clipboard.');
- },
- dataJog: function() {
- var Twitter = new TwitterAPI(this.user);
- var id = this.tweet.id_str;
- var request = new
- Mojo.Service.Request("palm://com.palm.applicationManager", {
- method: 'send',
- parameters: {
- id: 'com.datajog.webos',
- params: { data: this.twitterLink}
- }
- });
- banner('Sent URL to DataJog');
- },
- addToInstaPaper: function() {
- var url = "https://www.instapaper.com/api/add";
- var params = 'url=' + encodeURIComponent(this.twitterLinkIp);
- params += "&username=" +
- encodeURIComponent(this.ippUser) + "&password=" +
- encodeURIComponent(this.ippPass);
- new Ajax.Request(url, {
- method: 'post',
- parameters: params,
- onComplete: function() {
- banner('Added Tweet URL to InstaPaper');
- }.bind(this),
- onFailure: function(transport) {
- if (transport.responseText == 403) {
- banner('Incorrect Instapaper Username/Password');
- }
- else{
- banner('The service encountered an error. Please try again later.');
- }
- }
- })
- },
- addToReaditLater: function() {
- var url = "https://readitlaterlist.com/v2/send";
- var params = "new={";
- params += '"0":{"url":"' + encodeURIComponent(this.twitterLink)
- + '"}';
- params += "}";
- params += "&username=" + encodeURIComponent(this.rilUser) +
- "&password=" + encodeURIComponent(this.rilPass) +
- "&apikey=fI1g8vdip517aY2d4eT21ejk9aA8X432";
- new Ajax.Request(url, {
- method: 'post',
- parameters: params,
- onComplete: function(transport) {
- banner('Added URL to ReadItLater');
- }.bind(this),
- onFailure: function(transport) {
- banner('Failed to add. Reason: ' +
- transport.responseText);
- }
- });
- },
- copyUrl: function() {
- this.controller.stageController.setClipboard(this.twitterLink,true);
- banner('Copied tweet URL to clipboard.');
- },
- //Sends the current tweet via email and adds the tag "Sent via Project Macaw for webOS"
- email: function() {
- var Twitter = new TwitterAPI(this.user);
- this.controller.serviceRequest(
- "palm://com.palm.applicationManager", {
- method: 'open',
- parameters: {
- id: "com.palm.app.email",
- params: {
- summary: "I would like to share this tweet with you",
- text: "From" + " @" + this.tweet.user.screen_name + ": " + this.tweet.stripped + "<br>" + " -- Sent via Project Macaw for webOS"
- }
- }
- }
- );
- },
- //Sends the current tweet via SMS/Instant Message
- sms: function() {
- this.controller.serviceRequest('palm://com.palm.applicationManager', {
- method: 'launch',
- parameters: {
- id: 'com.palm.app.messaging',
- params: {
- messageText: this.tweet.stripped
- }
- },
- onSuccess: this.handleOKResponse,
- onFailure: this.handleErrResponse
- });
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement