• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisão303378153bd14e35b68d0b37f1fa3d62ebd2da05 (tree)
Hora2018-03-21 23:21:53
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Mensagem de Log

BugTrack/2434 Improve props transfer on Searching

Mudança Sumário

Diff

--- a/lib/html.php
+++ b/lib/html.php
@@ -239,9 +239,9 @@ EOS;
239239 'base_uri_pathname' => get_base_uri(PKWK_URI_ROOT),
240240 'base_uri_absolute' => get_base_uri(PKWK_URI_ABSOLUTE)
241241 );
242- $props_json = htmlsc(json_encode($props, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
242+ $h_props = htmlsc(json_encode($props, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
243243 $site_props = <<<EOS
244-<div data-key="site-props" data-value="$props_json"></div>
244+<input type="hidden" class="site-props" value="$h_props" />
245245 EOS;
246246 $h_plugin = htmlsc($plugin);
247247 $plugin_prop = <<<EOS
--- a/skin/search2.js
+++ b/skin/search2.js
@@ -96,11 +96,9 @@ window.addEventListener && window.addEventListener('DOMContentLoaded', function(
9696 }
9797 function getSiteProps() {
9898 var empty = {};
99- var propsDiv = document.getElementById('pukiwiki-site-properties');
100- if (!propsDiv) return empty;
101- var jsonE = propsDiv.querySelector('div[data-key="site-props"]');
102- if (!jsonE) return empty;
103- var props = JSON.parse(jsonE.getAttribute('data-value'));
99+ var propsE = document.querySelector('#pukiwiki-site-properties .site-props');
100+ if (!propsE) return empty;
101+ var props = JSON.parse(propsE.value);
104102 return props || empty;
105103 }
106104 /**