Browse Source

Remove <img> in ranklist user infomation

master
Menci 8 years ago
parent
commit
d0e8ad791d
  1. 2
      views/index.ejs
  2. 2
      views/ranklist.ejs

2
views/index.ejs

@ -48,6 +48,8 @@
var elem = document.createElement('div');
elem.style = 'max-height: 50px; overflow: hidden; width: 100%; max-width: 480px; ';
elem.innerHTML = html;
var imgs = Array.from(elem.getElementsByTagName('img'));
for (var i in imgs) imgs[i].parentNode.removeChild(imgs[i]);
var script = document.getElementById('user-infomation-script-<%= i %>');
script.parentNode.replaceChild(elem, script);
})();

2
views/ranklist.ejs

@ -32,6 +32,8 @@
var elem = document.createElement('div');
elem.style = 'max-height: 50px; overflow: hidden; width: 100%; max-width: 840px; ';
elem.innerHTML = html;
var imgs = Array.from(elem.getElementsByTagName('img'));
for (var i in imgs) imgs[i].parentNode.removeChild(imgs[i]);
var script = document.getElementById('user-infomation-script-<%= i %>');
script.parentNode.replaceChild(elem, script);
})();

Loading…
Cancel
Save