Wojak Posted September 3, 2015 Posted September 3, 2015 Facebook web page is not displaying properly in the browser build in MTA (it looks like all the HTML generated by javascript is missing). All other pages seem to work, and the domain is whitelisted. Also the page works fine in stand alone Chrome. I'm using Windows 7 x64 and found one more user with the same system and same problem. Since I didn't see this problem listed on bug tracker and I doubt that I'm the only one that tried to open facebook in MTA, this may by a rare bug...
0 Jusonex Posted September 3, 2015 Posted September 3, 2015 Facebook hosts many assets on CDNs like Akaimai, so that you have to request these as well. You can figure them out by enabling the debug mode as described here: https://wiki.multitheftauto.com/wiki/CE ... #Debugging Try this (some hosts are probably dynamic though and change over time): requestBrowserDomains{"www.facebook.com", "facebook.com", "fbstatic-a.akamaihd.net", "pixel.facebook.com", "fbcdn-dragon-a.akamaihd.net", "scontent-vie1-1.xx.fbcdn.net"}
0 Wojak Posted September 4, 2015 Author Posted September 4, 2015 Thank You, You've put me on the right track This solved the problem: https://wiki.multitheftauto.com/wiki/On ... rceBlocked The default webbrowser resource doesn't handle this event... (adverts may be the reason why...) Anyway this is what I did: --in "WebBrowserGUI:constructor()" addEventHandler("onClientBrowserResourceBlocked", root, function(...) self:Browser_BrowserResourceBlocked(...) end) --in "WebBrowserGUI:Browser_WhitelistChange(whitelistedURLs)" at the beginning of the function if self.m_RequestedURL == "" then self.m_RequestedURL = self.m_Browser:getBrowser():getURL() self.m_Browser:getBrowser():loadURL(self.m_RequestedURL) self.m_RequestedURL = "" return end --in main chunk local blacklist = {["partner.googleadservices.com"]=true} -- this blocks the most annoying adverts on free forums function WebBrowserGUI:Browser_BrowserResourceBlocked(url, domain, reason) local isBlocked = isBrowserDomainBlocked(url) if isBlocked and not blacklist[domain] then Browser.requestDomains({url}, true) return end end
Question
Wojak
Facebook web page is not displaying properly in the browser build in MTA (it looks like all the HTML generated by javascript is missing).
All other pages seem to work, and the domain is whitelisted.
Also the page works fine in stand alone Chrome.
I'm using Windows 7 x64 and found one more user with the same system and same problem.
Since I didn't see this problem listed on bug tracker and I doubt that I'm the only one that tried to open facebook in MTA, this may by a rare bug...
2 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now