forked from 0x2620/pandora
use new embed url in embed dialog
This commit is contained in:
parent
b63a671c2c
commit
f227766eac
1 changed files with 4 additions and 15 deletions
|
@ -59,21 +59,10 @@ pandora.ui.embedDialog = function(data) {
|
||||||
);
|
);
|
||||||
|
|
||||||
function constructURL(data) {
|
function constructURL(data) {
|
||||||
var url = document.location.protocol
|
var url = document.location.href + (
|
||||||
+ '//' + document.location.host
|
document.location.hash ? '?embed=true' : '#?embed=true'
|
||||||
+ '/' + pandora.user.ui.item + '/embed?',
|
);
|
||||||
query = [];
|
return url;
|
||||||
Ox.forEach(data, function(value, key) {
|
|
||||||
if (['in', 'out'].indexOf(key) > -1) {
|
|
||||||
value = value.toFixed(3);
|
|
||||||
}
|
|
||||||
if (key[0] != '_') {
|
|
||||||
query.push(
|
|
||||||
encodeURIComponent(key) + '=' + encodeURIComponent(value)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return url + query.join('&');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
|
|
Loading…
Reference in a new issue