diff --git a/UI/CustomGenerator/SharePanel.ts b/UI/CustomGenerator/SharePanel.ts
index db479ecd8..bc30696cb 100644
--- a/UI/CustomGenerator/SharePanel.ts
+++ b/UI/CustomGenerator/SharePanel.ts
@@ -22,31 +22,11 @@ export default class SharePanel extends UIElement {
"
Share
",
"Share the following link with friends:
",
new VariableUiElement(liveUrl.map(url => `${url}`)),
- "Publish on OSM Wiki
",
- "In the list of 'hacks upon hacks to make MapComplete work', it is now possible to put the JSON-file onto a Wikipage*.
" +
- "This is a very stable and very well-tested solution. Using wikipages as source control! What could possibly go wrong???? /s
",
-
- "Why to publish the layout as a wikipage?",
- "",
- ...["If something breaks, it can be fixed centrally",
- "If someone has a remark about your preset, the talk page can be used to point this out and discuss the preset",
- "In case of a grave error, everyone can step in to fix the prest"].map(li => `- ${li}
`),
- "
",
-
- "In order to make this work:",
- "",
-
- ...[`Create a new page on the OSM-wiki, e.g. ${proposedName}`,
- "Click 'create page'",
- "Type <nowiki>, a few newlines and </nowiki>",
- "Copy the json configuration from the 'save-tab', paste it between the 'nowiki'-tags in the Wiki",
- "Click 'save' to save the wiki page",
- "Share the link with the url parameter userlayout=wiki:YOURWIKIPAGE, e.g. " +
- `https://${window.location.host}?userlayout=${proposedNameEnc}`
- ].map(li => `- ${li}
`),
-
- "
",
- "(* This has made a lot of people very angry and been widely regarded as a bad move.)",
+ "Publish on some website
",
+
+ "It is possible to load a JSON-file from the wide internet, but you'll need some (public CORS-enabled) server.",
+ `Put the raw json online, and use ${window.location.host}?userlayout=https://.json`,
+ "Please note: it used to be possible to load from the wiki - this is not possible anymore due to technical reasons.",
""
]);
}
diff --git a/index.ts b/index.ts
index 48eb22d35..0a912a38d 100644
--- a/index.ts
+++ b/index.ts
@@ -64,36 +64,24 @@ document.getElementById('centermessage').innerText = '';
document.getElementById("decoration-desktop").remove();
-if (layoutFromBase64.startsWith("wiki:")) {
- console.log("Downloading map theme from the wiki");
- const themeName = layoutFromBase64.substr("wiki:".length);
- new FixedUiElement(`Downloading ${themeName} from the wiki...`)
+if (layoutFromBase64.startsWith("http")) {
+ const link = layoutFromBase64;
+ console.log("Downloading map theme from ", link);
+ new FixedUiElement(`Downloading the theme from the link...`)
.AttachTo("centermessage");
- const cleanUrl = `https://wiki.openstreetmap.org/wiki/${themeName}`;
- const url = `https://cors-anywhere.herokuapp.com/` + cleanUrl; // ~NOT~ VERY SAFE AND HACKER-PROOF!
- // We use cors-anywhere because the wiki from openstreetmap is locked-down :(
- /*/
- const url = cleanUrl; // MUCH SAFER! //*/
$.ajax({
- url: url,
+ url: link,
success: function (data) {
- // Hacky McHackFace has been working here. This'll probably break in the future
- const startTrigger = "";
- const start = data.indexOf(startTrigger);
- data = data.substr(start,
- data.indexOf("