ID:270531
 
I was wondering is there a way to close all browsers.
A reboot() or booting the client closes all browsers. Other than that, the only way is to track each browser you open.
In response to Shadowdarke
aww
client
var/list/browsers[0]
proc/browse2(content, flags)
var/n = findtext(flags, "window=")
if(n)
var/text = copytext(flags, n+7, findtext(flags, ";", n+7))
if(!(text in browsers)) browsers.Add(text)
src << browse(content, flags)
proc/close_browsers()
for(var/browser in browsers)
src << browse(, "window=[browser]")

Something along those lines. Just call the browse2 function instead of outputting browse.
mob/verb/html_test(html as message, window as text)
client.browse2(html, "window=[window]")
client/verb/close_all_my_browsers()
close_browsers()
In response to Loduwijk
thanks Loduwijk