mirror of
https://github.com/samuelmaddock/gm-mediaplayer.git
synced 2025-03-04 03:03:02 -05:00
fix: early URL polling js error
This commit is contained in:
parent
6cadade8aa
commit
b7854a3dd9
@ -116,7 +116,11 @@ function PANEL:Think()
|
||||
end
|
||||
|
||||
function PANEL:FetchPageURL()
|
||||
local js = "gmod.getUrl(window.location.href);"
|
||||
local js = [[
|
||||
if (typeof gmod === 'object' && typeof gmod.getUrl === 'function') {
|
||||
gmod.getUrl(window.location.href);
|
||||
}
|
||||
]]
|
||||
self:RunJavascript(js)
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user