UNPKG
foam-framework
Version:
latest (0.5.0)
0.5.0
0.4.3
0.4.2
0.4.1
0.4.0
MVC metaprogramming framework
github.com/foam-framework/foam
foam-framework/foam
foam-framework
/
apps
/
mbug
/
oauth.js
7 lines
(5 loc)
•
188 B
JavaScript
View Raw
1
2
3
4
5
6
7
var
state = location.
hash
.
match
(
/state=([^&]*)/
);
var
token = location.
hash
.
match
(
/token=([^&]*)/
);
if
( state ) {
window
.
opener
.
__JSONP_CALLBACKS__
[state[
1
]](token ? token[
1
] :
''
); }