Skip to content

Commit 422523d

Browse files
committed
图片添加禁止全屏的方法
1 parent 1fd3d66 commit 422523d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

assets/js/img.screenfull.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
(function(window, document) {
22
var sf = function($imgs) {
33
$imgs.forEach(function($img) {
4-
$img.addEventListener('click', function() {
5-
show(this);
6-
}, false);
4+
if ($img.classname.indexOf('no-screenfull') === -1) {
5+
$img.addEventListener('click', function () {
6+
show(this);
7+
}, false);
8+
}
79
});
810
};
911

ppts/demo.md

+7
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,13 @@ nodeppt:https://github.com/ksky521/nodePPT
417417
![小萝莉](/girl.jpg "小萝莉")
418418

419419

420+
[slide]
421+
422+
## 图片,禁止全屏
423+
----
424+
425+
<img src="/girl.jpg" class="not">
426+
420427
[slide]
421428
[note]
422429
##这里是note

0 commit comments

Comments
 (0)