diff --git a/Periscope_Web_Client.user.js b/Periscope_Web_Client.user.js index a39eff1..98c59cf 100644 --- a/Periscope_Web_Client.user.js +++ b/Periscope_Web_Client.user.js @@ -5,7 +5,7 @@ // @description Periscope client based on API requests. Visit example.net for launch. // @include https://api.twitter.com/oauth/404* // @include http://example.net/* -// @version 1.1 +// @version 1.2 // @author Pmmlabs@github // @grant GM_xmlhttpRequest // @require https://code.jquery.com/jquery-1.11.3.js @@ -844,7 +844,7 @@ Chat: function () { console.log('new location: ' + event.lat + ', ' + event.lng + ', ' + event.heading); break; case 5: // broadcast ended - container.append('
*** ' + event.displayName + ' (@' + event.username + ') ended the broadcast
'); + container.append('
*** ' + event.displayName + (event.username ? ' (@' + event.username + ')' : '') + ' ended the broadcast
'); break; case 6: // invited followers container.append('
*** ' + (event.displayName || '') + ' (@' + event.username + '): ' + event.body.replace('*%s*', event.invited_count) + '
'); @@ -936,13 +936,16 @@ Chat: function () { duration: 100 // actually 40 is maximum }), onload: function (history) { - history = JSON.parse(history.responseText); - for (var i in history.messages) - processWSmessage(history.messages[i], historyDiv); - if (history.cursor != '') - historyLoad(history.cursor); - else - $('#spinner').hide(); + if (history.status == 200) { + history = JSON.parse(history.responseText); + for (var i in history.messages) + processWSmessage(history.messages[i], historyDiv); + if (history.cursor != '') + historyLoad(history.cursor); + else + $('#spinner').hide(); + } else + $('#spinner').hide(); } }); }; diff --git a/README.md b/README.md index 0722be6..90301bc 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,28 @@ + # OpenPeriscope Unofficial in-browser web client for Periscope (userscript) -### Using +### Using as standalone application + +If you have [NW.js](http://nwjs.io) installed, you can run ` nw . ` in repo directory + +Or, you can use pre-built executables from [Releases page](https://github.com/Pmmlabs/OpenPeriscope/releases) + +### Using as userscript 1. Install [userscript manager](https://greasyfork.org/help/installing-user-scripts) 1. Click to [link](https://raw.githubusercontent.com/Pmmlabs/OpenPeriscope/master/Periscope_Web_Client.user.js) and then "Install" 1. Navigate to http://example.net + +In this case posting to chat will not work. + +### Authorization + 1. Type consumer secret of Periscope App (_Where do I get it?_ Hunt out. Reverse the app, steal from twitter's devs, or something else) 1. Click "Sign in with twitter" 1. Login to the Twitter (if not yet) and click "Authorize" 1. Here you go! -### Using as standalone application - -If you have [NW.js](http://nwjs.io) installed, you can run ` nw . ` in repo directory - ### Broadcasts downloading With OpenPeriscope and FFmpeg, you can download live broadcasts and replays. diff --git a/package.json b/package.json index 8a27249..a22fd99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openperiscope", - "version": "1.1.0", + "version": "1.2.0", "description": "Unofficial Periscope client", "license": "GPL-2.0", "repository": "Pmmlabs/OpenPeriscope",