IsBrowserDomainBlocked: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
Line 15: Line 15:


==Example==
==Example==
Todo
<syntaxhighlight lang="lua">
--Check the state of wiki.mtasa.com
if ( isBrowserDomainBlocked ( "wiki.mtasa.com" ) ) then
--If it is blocked.
outputChatBox("wiki.mtasa.com is blocked and can't be loaded right now!")
else
--If it is not blocked. (Was accepted by the user)
outputChatBox("wiki.mtasa.com is not blocked and ready to be loaded!")
end
</syntaxhighlight>


==See Also==
==See Also==
{{CEF_functions}}
{{CEF_functions}}

Revision as of 00:21, 6 February 2015

This function checks if the specified URL is blocked from being loaded.

Syntax

bool isBrowserDomainBlocked ( string url )

Required arguments

  • URL: A website URL

Returns

Returns true if the URL is able to be loaded, false if it is blocked.

Example

--Check the state of wiki.mtasa.com
if ( isBrowserDomainBlocked ( "wiki.mtasa.com" ) ) then
	--If it is blocked.
	outputChatBox("wiki.mtasa.com is blocked and can't be loaded right now!")
else
	--If it is not blocked. (Was accepted by the user)
	outputChatBox("wiki.mtasa.com is not blocked and ready to be loaded!")
end

See Also