[openstreetmap/openstreetmap-website] Introduce sidebar content get/set functions (PR #3773)
Tom Hughes
notifications at github.com
Sun Oct 30 18:46:17 UTC 2022
@tomhughes commented on this pull request.
> -
- if (xhr.getResponseHeader("X-Page-Title")) {
- var title = xhr.getResponseHeader("X-Page-Title");
- document.title = decodeURIComponent(title);
- }
-
- $("head")
- .find("link[type=\"application/atom+xml\"]")
- .remove();
-
- $("head")
- .append(content.filter("link[type=\"application/atom+xml\"]"));
-
- $("#sidebar_content").html(content.not("link[type=\"application/atom+xml\"]"));
-
+ OSM.setSidebarContent([xhr.getResponseHeader("X-Page-Title"), xhr.responseText]);
What's the idea between packing these arguments into an array and then unpacking them inside the function rather than just passing two arguments?
Is it so you can pass the array returned by the get function into the set function in a later patch?
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3773#pullrequestreview-1161176376
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3773/review/1161176376 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20221030/fd494051/attachment.htm>
More information about the rails-dev
mailing list