/[LeafOK_CVS]/fenglin/gen_ex/img_adjust.js
ViewVC logotype

Annotation of /fenglin/gen_ex/img_adjust.js

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations)
Sat Apr 5 04:09:40 2025 UTC (11 months, 1 week ago) by sysadm
Branch: MAIN
Changes since 1.2: +12 -4 lines
Content type: text/javascript
Refine

1 sysadm 1.3 function image_adjust(width)
2 sysadm 1.1 {
3 sysadm 1.2 for (img of document.images)
4 sysadm 1.1 {
5 sysadm 1.3 if (img.width > width)
6 sysadm 1.1 {
7 sysadm 1.3 img.width = width;
8 sysadm 1.1 }
9     }
10     }
11    
12 sysadm 1.3 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 sysadm 1.2 window.addEventListener("load", (e) => {
21 sysadm 1.3 image_adjust(550);
22 sysadm 1.2 });

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1