make mobile code usable for embedding
This commit is contained in:
parent
cf6374e8a6
commit
84c2a3ac3c
2 changed files with 13 additions and 11 deletions
|
|
@ -1,10 +1,11 @@
|
|||
|
||||
|
||||
function parseURL() {
|
||||
var fragment = document.location.hash.slice(1)
|
||||
if (!fragment && document.location.pathname.startsWith('/m/')) {
|
||||
var prefix = document.location.protocol + '//' + document.location.hostname + '/m/'
|
||||
fragment = document.location.href.slice(prefix.length)
|
||||
var url = pandora.url ? pandora.url : document.location,
|
||||
fragment = url.hash.slice(1)
|
||||
if (!fragment && url.pathname.startsWith('/m/')) {
|
||||
var prefix = url.protocol + '//' + url.hostname + '/m/'
|
||||
fragment = url.href.slice(prefix.length)
|
||||
}
|
||||
var args = fragment.split('?')
|
||||
var id = args.shift()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue