From d0be7d254f9662aab736d79caa9ce5062a9bb89a Mon Sep 17 00:00:00 2001 From: Jonathan Wilkes <jon.w.wilkes@gmail.com> Date: Thu, 25 Feb 2016 22:51:58 -0500 Subject: [PATCH] fix ambiguous function name, and rename variable to clarify difference between DOM window and nw Window --- pd/nw/pdgui.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js index dff3acea9..1bbca2d3c 100644 --- a/pd/nw/pdgui.js +++ b/pd/nw/pdgui.js @@ -3392,9 +3392,9 @@ function gui_midi_properties(gfxstub, sys_indevs, sys_outdevs, exports.skin = (function () { var dir = "css/"; var preset = "default"; - var w; - function apply(win) { - win.window.document.getElementById("page_style") + var id; + function set_css(win) { + win.document.getElementById("page_style") .setAttribute("href", dir + preset + ".css"); } return { @@ -3405,17 +3405,17 @@ exports.skin = (function () { set: function (name) { preset = name; post("trying to set..."); - for (w in patchwin) { - if (patchwin.hasOwnProperty(w) && patchwin[w]) { - apply(patchwin[w]); + for (id in patchwin) { + if (patchwin.hasOwnProperty(id) && patchwin[id]) { + set_css(patchwin[id].window); } } // hack for the console pd_window.document.getElementById("page_style") .setAttribute("href", dir + preset + ".css"); }, - apply: function (nw_window) { - apply(nw_window); + apply: function (win) { + set_css(win); } }; }()); -- GitLab