mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 20:47:10 +01:00
Improved Wiki Button (#15147)
* Improved Wiki Button * delete redundant popup Co-authored-by: Kyep <Kyep@users.noreply.github.com>
This commit is contained in:
@@ -261,14 +261,7 @@ SUBSYSTEM_DEF(changelog)
|
||||
if("forum")
|
||||
usr.client.forum()
|
||||
if("wiki")
|
||||
// Wiki needs snowflake because it has no cancel button
|
||||
if(config.wikiurl)
|
||||
if(alert("This will open the wiki in your browser. Are you sure?",,"Yes","No")=="No")
|
||||
return
|
||||
usr.client.wiki()
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The Wiki URL is not set in the server configuration. Please inform the server host.</span>")
|
||||
|
||||
usr.client.wiki()
|
||||
if("github")
|
||||
usr.client.github()
|
||||
// Takes a PR number as argument
|
||||
|
||||
@@ -4,8 +4,12 @@
|
||||
set desc = "Type what you want to know about. This will open the wiki in your web browser."
|
||||
set hidden = 1
|
||||
if(config.wikiurl)
|
||||
if(alert("Open the wiki in your browser?", null, "Yes", "No") == "Yes")
|
||||
var/query = stripped_input(src, "Enter Search:", "Wiki Search", "Homepage")
|
||||
if(query == "Homepage")
|
||||
src << link(config.wikiurl)
|
||||
else if(query)
|
||||
var/output = config.wikiurl + "/index.php?title=Special%3ASearch&profile=default&search=" + query
|
||||
src << link(output)
|
||||
else
|
||||
to_chat(src, "<span class='danger'>The wiki URL is not set in the server configuration.</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user