Parent Directory
|
Revision Log
Refine img_adjust
| 1 | function image_adjust(width) |
| 2 | { |
| 3 | for (img of document.images) |
| 4 | { |
| 5 | if (img.width > width) |
| 6 | { |
| 7 | img.width = width; |
| 8 | } |
| 9 | } |
| 10 | } |
| 11 | |
| 12 | function bbs_img_zoom(e, o) |
| 13 | { |
| 14 | var zoom = parseInt(o.style.zoom, 10) || 100; |
| 15 | zoom += e.wheelDelta / 12; |
| 16 | if (zoom > 0) o.style.zoom = zoom + '%'; |
| 17 | return false; |
| 18 | } |
| 19 | |
| 20 | window.addEventListener("load", (e) => { |
| 21 | image_adjust(550); |
| 22 | }); |
| webmaster@leafok.com | ViewVC Help |
| Powered by ViewVC 1.3.0-beta1 |