Skip to content

Commit

Permalink
#56 fix for userscript
Browse files Browse the repository at this point in the history
  • Loading branch information
Pmmlabs committed Nov 4, 2016
1 parent 6737fd8 commit 1a1f73b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Periscope_Web_Client.meta.js
Expand Up @@ -3,7 +3,7 @@
// @name Periscope Web Client
// @namespace https://greasyfork.org/users/23
// @description Periscope client based on API requests. Visit example.net for launch.
// @include https://api.twitter.com/oauth/openperiscope*
// @include https://api.twitter.com/oauth/authorize
// @include http://example.net/*
// @version 1.5
// @author Pmmlabs@github
Expand Down
8 changes: 4 additions & 4 deletions Periscope_Web_Client.user.js
Expand Up @@ -3,7 +3,7 @@
// @name Periscope Web Client
// @namespace https://greasyfork.org/users/23
// @description Periscope client based on API requests. Visit example.net for launch.
// @include https://api.twitter.com/oauth/openperiscope*
// @include https://api.twitter.com/oauth/authorize
// @include http://example.net/*
// @version 1.5
// @author Pmmlabs@github
Expand Down Expand Up @@ -557,8 +557,8 @@ const css = '<style>\
</style>';
//</editor-fold>

if (location.href.indexOf('twitter.com/oauth/openperiscope') > 0) {
location.href = 'http://example.net/' + location.search;
if (location.href == 'https://api.twitter.com/oauth/authorize') {
location.href = $('meta[http-equiv="refresh"]').attr('content').substr(6).replace('twittersdk://openperiscope/index.html', 'http://example.net/');
} else {
$('style').remove();
$(document.head).append(css);
Expand Down Expand Up @@ -2265,7 +2265,7 @@ function SignIn1() {
$(this).text('Loading...');
OAuthTwitter('request_token', function (oauth) {
location.href = 'https://api.twitter.com/oauth/authorize?oauth_token=' + oauth.oauth_token;
}, {oauth_callback: (NODEJS ? 'twittersdk://openperiscope/index.html' : 'openperiscope')});
}, {oauth_callback: 'twittersdk://openperiscope/index.html'});
}
}
function SignOut() {
Expand Down

0 comments on commit 1a1f73b

Please sign in to comment.