From f6b80268d70944409926d574e7ed71d8a73d4af1 Mon Sep 17 00:00:00 2001 From: Kyep <16434066+Kyep@users.noreply.github.com> Date: Sun, 10 Jan 2021 20:11:04 +0000 Subject: [PATCH] Improved Wiki Button (#15147) * Improved Wiki Button * delete redundant popup Co-authored-by: Kyep --- code/controllers/subsystem/changelog.dm | 9 +-------- interface/interface.dm | 6 +++++- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/code/controllers/subsystem/changelog.dm b/code/controllers/subsystem/changelog.dm index 76a05eec505..3a2e3513916 100644 --- a/code/controllers/subsystem/changelog.dm +++ b/code/controllers/subsystem/changelog.dm @@ -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, "The Wiki URL is not set in the server configuration. Please inform the server host.") - + usr.client.wiki() if("github") usr.client.github() // Takes a PR number as argument diff --git a/interface/interface.dm b/interface/interface.dm index 2b2f41e06f3..6038bd4af7b 100644 --- a/interface/interface.dm +++ b/interface/interface.dm @@ -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, "The wiki URL is not set in the server configuration.") return