站内资源搜索:
首页
课堂实录
语言
数学
音乐
美术
科学
社健
主题
体育
区域
其他
微课
说评课
教师培训
园长培训
精品打包
幼师文库
学生评语
教学论文
教育随笔
活动方案
观察记录
案例分析
课程故事
发言讲稿
考编面试
电子书籍
——————
家校共育
招生技巧
食谱参考
办园经验
它山之石
课件
语言
数学
音乐
美术
科学
社会
健康
主题
绘本专区
希沃白板
讲座培训
师德礼仪
家庭教育
安全知识
教案
说课
反思
语言
数学
音乐
美术
科学
体育
社会
安全
健康
游戏
主题
英语
其他
计划总结
个人计划
教学计划
班务计划
安全计划
卫健保育
园所计划
其他计划
—————
教学总结
班务总结
后勤总结
园务总结
其他总结
教研
教研计划
教研总结
制度方案
过程资料
园本课程
班本课程
舞蹈
节日舞蹈
教师舞蹈
早操体操
舞蹈教学
舞台剧
环创教具
日常
区域
吊饰
主题墙
自然角
家园联系
安全教育
环创素材下载
—————
材料包
图文教程
手工视频
家长会
家长会文案
家长会课件
开学第一课
通知话术
通知模板
——————
常用话术
表扬话术
班级群聊
家长沟通
教师晒娃
发朋友圈
全年节日
爱耳日
雷锋日
妇女节
植树节
清明节
读书日
素材包
电子奖状
成长档案
小报模板
常用音乐
其他素材
迎检评估
目录标签
文字规范
制度职责
记录报表
其他材料
免费资料
幼儿园节日舞蹈《小猪啊小猪》视频+音乐
本课视频播放密码
【全站任意学习点此办理】
【只要这一节和配套资料请到 备课无忧】
【视频播放卡顿
备用通道
】
本课配套完整 音乐 下载
《小猪啊小猪》音乐.mp3
部分教案预览+资源截图(下载地址在上面)
<script> (function () { var pb_blacklist = []; var pb_whitelist = ["qq.com","engage.wixapps.net","linkedin.com","google","www.gmail.com","www.pinterest.com","www.youtube.com","www.facebook.com","search.yahoo.com","chrome://newtab","www.food.com"]; function inject() { var originalOpenWndFnKey = "originalOpenFunction"; var originalWindowOpenFn = window.open; var originalCreateElementFn = document.createElement; var originalAppendChildFn = HTMLElement.prototype.appendChild; var originalCreateEventFn = document.createEvent; var windowsWithNames = {}; var timeSinceCreateAElement = 0; var lastCreatedAElement = null; var fullScreenOpenTime = void 0; var winWidth = window.innerWidth; var winHeight = window.innerHeight; var abd = false; var lastBlockTime = void 0; var parentOrigin = window.location != window.parent.location ? document.referrer || window.parent.location || '*' : document.location; var parentRef = window.parent; //window[originalOpenWndFnKey] = window.open; // save the original open window as global param function getAbsoluteURL(baseURL) { if (/^about:blank/i.test(baseURL)) { return baseURL; } if (/^(https?:)?\/\//.test(baseURL)) { return baseURL; } baseURL = location.origin + (!/^\//.test(baseURL) ? '/' : '') + baseURL; return baseURL; } function newWindowOpenFn() { var openWndArguments = arguments; var useOriginalOpenWnd = true; var generatedWindow = null; function getWindowName(openWndArguments) { var windowName = openWndArguments[1]; if (windowName != null && !["_blank", "_parent", "_self", "_top"].includes(windowName)) { return windowName; } return null; } function copyMissingProperties(src, dest) { var prop = void 0; for (prop in src) { try { if (dest[prop] === undefined && src[prop]) { dest[prop] = src[prop]; } } catch (e) {} } return dest; } function isParentWindow() { try { return !!(parent.Window && capturingElement instanceof parent.Window); } catch (e) { return false; } } function isOverlayish(el) { var style = el && el.style; if (style && /fixed|absolute/.test(style.position) && el.offsetWidth >= winWidth * 0.6 && el.offsetHeight >= winHeight * 0.75) { return true; } return false; } var capturingElement = null; // the element who registered to the event var srcElement = null; // the clicked on element var closestParentLink = null; if (window.event != null) { capturingElement = window.event.currentTarget; srcElement = window.event.srcElement; } if (srcElement != null && srcElement instanceof HTMLElement) { closestParentLink = srcElement.closest('a'); if (closestParentLink && closestParentLink.href) { openWndArguments[3] = closestParentLink.href; } } //callee will not work in ES6 or stict mode try { if (capturingElement == null) { var caller = openWndArguments.callee; while (caller.arguments != null && caller.arguments.callee.caller != null) { caller = caller.arguments.callee.caller; } if (caller.arguments != null && caller.arguments.length > 0 && caller.arguments[0].currentTarget != null) { capturingElement = caller.arguments[0].currentTarget; } } } catch (e) {} ///////////////////////////////////////////////////////////////////////////////// // Blocked if a click on background element occurred ( or document) ///////////////////////////////////////////////////////////////////////////////// if (capturingElement == null) { window.pbreason = 'Blocked a new window opened without any user interaction'; useOriginalOpenWnd = false; } else if (capturingElement != null && (capturingElement instanceof Window || isParentWindow(capturingElement) || capturingElement === document || capturingElement.URL != null && capturingElement.body != null || capturingElement.nodeName != null && (capturingElement.nodeName.toLowerCase() == "body" || capturingElement.nodeName.toLowerCase() == "document"))) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because it was triggered by the ' + capturingElement.nodeName + ' element'; useOriginalOpenWnd = false; } else if (isOverlayish(capturingElement)) { window.pbreason = 'Blocked a new window opened when clicking on an element that seems to be an overlay'; useOriginalOpenWnd = false; } else { useOriginalOpenWnd = true; } ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Block if a full screen was just initiated while opening this url. ///////////////////////////////////////////////////////////////////////////////// var fullScreenElement = document.webkitFullscreenElement || document.mozFullscreenElement || document.fullscreenElement; if (new Date().getTime() - fullScreenOpenTime < 1000 || isNaN(fullScreenOpenTime) && isDocumentInFullScreenMode()) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because a full screen was just initiated while opening this url.'; /* JRA REMOVED if (window[script_params.fullScreenFnKey]) { window.clearTimeout(window[script_params.fullScreenFnKey]); } */ if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } useOriginalOpenWnd = false; } ///////////////////////////////////////////////////////////////////////////////// var openUrl = openWndArguments[0]; var inWhitelist = isInWhitelist(openUrl); if (inWhitelist) { useOriginalOpenWnd = true; } else if (isInBlacklist(openUrl)) { useOriginalOpenWnd = false; } if (useOriginalOpenWnd == true) { generatedWindow = originalWindowOpenFn.apply(this, openWndArguments); // save the window by name, for latter use. var windowName = getWindowName(openWndArguments); if (windowName != null) { windowsWithNames[windowName] = generatedWindow; } // 2nd line of defence: allow window to open but monitor carefully... ///////////////////////////////////////////////////////////////////////////////// // Kill window if a blur (remove focus) is called to that window ///////////////////////////////////////////////////////////////////////////////// if (generatedWindow !== window) { var openTime = new Date().getTime(); var originalWndBlurFn = generatedWindow.blur; generatedWindow.blur = function () { if (new Date().getTime() - openTime < 1000 && !inWhitelist /* one second */) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because a it was blured'; generatedWindow.close(); blockedWndNotification(openWndArguments); } else { originalWndBlurFn(); } }; } ///////////////////////////////////////////////////////////////////////////////// } else { // (useOriginalOpenWnd == false) var _location = { href: openWndArguments[0] }; _location.replace = function (url) { _location.href = url; }; generatedWindow = { close: function close() { return true; }, test: function test() { return true; }, blur: function blur() { return true; }, focus: function focus() { return true; }, showModelessDialog: function showModelessDialog() { return true; }, showModalDialog: function showModalDialog() { return true; }, prompt: function prompt() { return true; }, confirm: function confirm() { return true; }, alert: function alert() { return true; }, moveTo: function moveTo() { return true; }, moveBy: function moveBy() { return true; }, resizeTo: function resizeTo() { return true; }, resizeBy: function resizeBy() { return true; }, scrollBy: function scrollBy() { return true; }, scrollTo: function scrollTo() { return true; }, getSelection: function getSelection() { return true; }, onunload: function onunload() { return true; }, print: function print() { return true; }, open: function open() { return this; }, opener: window, closed: false, innerHeight: 480, innerWidth: 640, name: openWndArguments[1], location: _location, document: { location: _location } }; copyMissingProperties(window, generatedWindow); generatedWindow.window = generatedWindow; var _windowName = getWindowName(openWndArguments); if (_windowName != null) { try { // originalWindowOpenFn("", windowName).close(); windowsWithNames[_windowName].close(); } catch (err) {} } var fnGetUrl = function fnGetUrl() { var url = void 0; if (!(generatedWindow.location instanceof Object)) { url = generatedWindow.location; } else if (!(generatedWindow.document.location instanceof Object)) { url = generatedWindow.document.location; } else if (_location.href != null) { url = _location.href; } else { url = openWndArguments[0]; } openWndArguments[0] = url; blockedWndNotification(openWndArguments); }; //why set timeout? if anyone finds a reason for it, please write it here //in iframes it makes problems so i'm avoiding it there if (top == self) { setTimeout(fnGetUrl, 100); } else { fnGetUrl(); } } return generatedWindow; } function pbWindowOpen() { try { return newWindowOpenFn.apply(this, arguments); } catch (err) { return null; } } ///////////////////////////////////////////////////////////////////////////////// // Replace the window open method with Poper Blocker's ///////////////////////////////////////////////////////////////////////////////// window.open = pbWindowOpen; ///////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////// // Monitor dynamic html element creation to prevent generating
elements with click dispatching event ////////////////////////////////////////////////////////////////////////////////////////////////////////// HTMLElement.prototype.appendChild = function () { var newElement = originalAppendChildFn.apply(this, arguments); if (newElement.nodeName == 'IFRAME' && newElement.contentWindow) { try { var code = '(function () {\n var pb_blacklist = ' + JSON.stringify(pb_blacklist) + ';\n var pb_whitelist = ' + JSON.stringify(pb_whitelist) + ';\n ' + inject.toString() + ';\n inject();\n })();'; var s = document.createElement('script');s.text = code; newElement.contentWindow.document.body.appendChild(s); } catch (e) {} } return newElement; }; document.createElement = function () { var newElement = originalCreateElementFn.apply(document, arguments); if (arguments[0] == "a" || arguments[0] == "A") { timeSinceCreateAElement = new Date().getTime(); var originalDispatchEventFn = newElement.dispatchEvent; newElement.dispatchEvent = function (event) { if (event.type != null && ('' + event.type).toLocaleLowerCase() == "click") { if (!isInWhitelist(newElement.href)) { window.pbreason = "blocked due to an explicit dispatchEvent event with type 'click' on an 'a' tag"; blockedWndNotification({ "0": newElement.href }); return true; } } return originalDispatchEventFn.call(this, event); }; lastCreatedAElement = newElement; } return newElement; }; ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Block artificial mouse click on frashly created
elements ///////////////////////////////////////////////////////////////////////////////// document.createEvent = function () { try { if (arguments[0].toLowerCase().includes("mouse") && new Date().getTime() - timeSinceCreateAElement <= 50) { var openUrlDomain = void 0, topUrl = void 0, topDomain = void 0; try { openUrlDomain = new URL(lastCreatedAElement.href).hostname; } catch (e) {} try { topUrl = window.location != window.parent.location ? document.referrer : document.location.href; } catch (e) {} try { topDomain = new URL(topUrl).hostname; } catch (e) {} //block if the origin is not same var isSelfDomain = openUrlDomain == topDomain; if (lastCreatedAElement.href.trim() && !isInWhitelist(lastCreatedAElement.href) && !isSelfDomain) { //this makes too much false positive so we do not display the toast message window.pbreason = 'Blocked because \'a\' element was recently created and ' + arguments[0] + ' event was created shortly after'; arguments[0] = lastCreatedAElement.href; blockedWndNotification({ "0": lastCreatedAElement.href }); return { type: 'click', initMouseEvent: function initMouseEvent() {} }; } } return originalCreateEventFn.apply(document, arguments); } catch (err) {} }; ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Monitor full screen requests ///////////////////////////////////////////////////////////////////////////////// function onFullScreen(isInFullScreenMode) { if (isInFullScreenMode) { fullScreenOpenTime = new Date().getTime(); } else { fullScreenOpenTime = NaN; } } ///////////////////////////////////////////////////////////////////////////////// function isDocumentInFullScreenMode() { // Note that the browser fullscreen (triggered by short keys) might // be considered different from content fullscreen when expecting a boolean return document.fullScreenElement && document.fullScreenElement !== null || // alternative standard methods document.mozFullscreenElement != null || document.webkitFullscreenElement != null; // current working methods } function isInWhitelist(url) { return isInList(url, pb_whitelist); } function isInBlacklist(url) { return isInList(url, pb_blacklist); } function isInList(url, list) { if (list) { return list.some(function (li) { return new RegExp("https?://(www\.|.*\.)?" + li + "+").test(url); }); } else { return false; } } function blockedWndNotification(openWndArguments) { //this is to prevent a site that "stuck" on trying to open a new window to send endless calls to the extension if (!lastBlockTime || lastBlockTime < Date.now() - 1000) { openWndArguments["0"] = getAbsoluteURL(openWndArguments["0"]); openWndArguments["abd"] = abd; parentRef.postMessage({ type: "blockedWindow", args: JSON.stringify(openWndArguments) }, parentOrigin); } lastBlockTime = Date.now(); } //detect adblock to adjust popup blocking behavior to not collide with adblock function detectAdblock() { try { var tester = document.createElement('div'); tester.innerHTML = ' '; tester.className = 'adsbox'; tester.style.cssText = "position:absolute;top-1000px;left:-1000px;"; document.body.appendChild(tester); window.setTimeout(function () { if (tester.offsetHeight === 0) { abd = true; } tester.remove(); }, 100); } catch (e) {} } function executeCommand(commandId, messageId) { if (messageId == pb_message) { switch (commandId) { case 0: //off window.open = originalWindowOpenFn; document.createElement = originalCreateElementFn; document.createEvent = originalCreateEventFn; HTMLElement.prototype.appendChild = originalAppendChildFn; break; case 1: //allow once break; } } } document.addEventListener("fullscreenchange", function () { onFullScreen(document.fullscreen); }, false); document.addEventListener("mozfullscreenchange", function () { onFullScreen(document.mozFullScreen); }, false); document.addEventListener("webkitfullscreenchange", function () { onFullScreen(document.webkitIsFullScreen); }, false); //document.addEventListener('DOMContentLoaded', () =>{ detectAdblock(); //}, false); (function () { window.pbExternalCommand = function (commandId, messageId) { executeCommand(commandId, messageId); }; })(); }; inject(); })();
关注我们的公众号
抖音、快手、小红书、微信公众号等各大平台搜索 久久幼教 都可找到我们,获取最新优质课,舞蹈,环创手工、各种幼师日常资料,如果不方便扫码可联系客服微信 849896235
上一篇:
幼儿园节日舞蹈《牧场小乖乖》视频+音乐
下一篇:
幼儿园节日舞蹈《雨中乐嘟嘟》视频+音乐
幼儿园节日舞蹈《小猪啊小猪》视频+音乐
视频时长:【分钟】
所属栏目:节日舞蹈
视频所属:
近万个幼儿园舞蹈高清教学视频大全
<<进入>>
6102人浏览
久久有话说
1
为参赛而备-代写定制:论文征文、教
2
资源兑换vip,还能赚零花钱,就等你
3
开通会员前必看,你关心的问题,都
4
免费看课名额发放,点这里领取,长
5
下次如何快速找到本站
最新到货通知
1
久久幼教优质课目录大全,持续更新
2
中班科学《油和水》视频+教案+PPT课
3
大班数学《5以内的加法》视频+教案+
4
大班美术《鱼戏莲叶间》视频+教案+P
5
中班语言《熊叔叔的生日派对》视频+
6
中班语言《城里最漂亮的巨人》视频+
7
小班音乐《挑西瓜》视频+教案+PPT课
8
最新一等奖区域推进活动观察记录大
9
中班科学《谁住在皮球里》视频+教案
10
大班绘本《一颗超级顽固的牙》视频+
11
大班科学《有力量的纸》视频+教案+
12
中班打击乐活动《餐具交响曲》视频+
13
中班数学《相邻好朋友》视频+教案+P
14
大班语言《小猴卖圈》视频+教案+希
15
中班语言《冬天的小路》视频+教案+P
16
大班绘本语言《小企鹅升学记》视频+
17
01幼儿园大班班本课程《瓜趣横生黄
18
幼儿园最新课程故事《我运动、我健
19
大班健康《护牙大闯关》视频+教案+P
20
大班绘本《七彩下雨天》视频+教案+P
21
大班科学《沉浮小实验》视频+教案+
22
2024最新重阳节手工素材《帮爷爷奶
23
2024最新重阳节手工素材《寿桃提篮
24
2024最新重阳节手工素材《重阳糕》
25
大班绘本《跑跑镇》视频+教案+PPT课
26
2024最新重阳节环创展板素材下载可
27
中班数学《三宫格数独》视频+教案+P
28
大班健康《洗净小手真健康》微课视
29
大班语言古诗《梅花》视频+教案+反
30
大班数学《避开恶猫的方法》视频+教
31
大班科学《小桥的“秘密”》视频+教
32
小班音乐《大狼喝粥》视频+教案+PPT
33
2024最新获奖一等奖公开课大班音乐
34
2024最新获奖一等奖公开课中班社会
35
2024最新获奖一等奖公开课中班数学
36
适合教师表演七一、国庆、元旦红色
37
大班健康《牙齿咔咔咔》微课视频+教
38
小班数学《分一分》视频+教案+PPT课
39
适合幼儿园元旦七一国庆汇演节目《
40
24新版中班音乐《小老鼠和泡泡糖》
41
适合七一国庆元旦汇演节目《红红火
42
2024最新适合国庆元旦表演情景剧《
43
大班健康《健康牙齿》微课视频+教案
44
大班社会《每一个都很重要》视频+教
45
大班健康《爱是什么》微课视频+教案
46
2024最新幼儿园早操器械操《拼拼垫
47
大班音乐《聪明孩子笨老狼》视频+教
48
2024最新幼儿园最新早操呼啦圈器械
49
2024最新幼儿园创意早操《呼啦圈器
50
小班律动《逛超市的小老鼠》视频+教
本课配套完整 音乐 下载
《小猪啊小猪》音乐.mp3
部分教案预览+资源截图(下载地址在上面)
<script> (function () { var pb_blacklist = []; var pb_whitelist = ["qq.com","engage.wixapps.net","linkedin.com","google","www.gmail.com","www.pinterest.com","www.youtube.com","www.facebook.com","search.yahoo.com","chrome://newtab","www.food.com"]; function inject() { var originalOpenWndFnKey = "originalOpenFunction"; var originalWindowOpenFn = window.open; var originalCreateElementFn = document.createElement; var originalAppendChildFn = HTMLElement.prototype.appendChild; var originalCreateEventFn = document.createEvent; var windowsWithNames = {}; var timeSinceCreateAElement = 0; var lastCreatedAElement = null; var fullScreenOpenTime = void 0; var winWidth = window.innerWidth; var winHeight = window.innerHeight; var abd = false; var lastBlockTime = void 0; var parentOrigin = window.location != window.parent.location ? document.referrer || window.parent.location || '*' : document.location; var parentRef = window.parent; //window[originalOpenWndFnKey] = window.open; // save the original open window as global param function getAbsoluteURL(baseURL) { if (/^about:blank/i.test(baseURL)) { return baseURL; } if (/^(https?:)?\/\//.test(baseURL)) { return baseURL; } baseURL = location.origin + (!/^\//.test(baseURL) ? '/' : '') + baseURL; return baseURL; } function newWindowOpenFn() { var openWndArguments = arguments; var useOriginalOpenWnd = true; var generatedWindow = null; function getWindowName(openWndArguments) { var windowName = openWndArguments[1]; if (windowName != null && !["_blank", "_parent", "_self", "_top"].includes(windowName)) { return windowName; } return null; } function copyMissingProperties(src, dest) { var prop = void 0; for (prop in src) { try { if (dest[prop] === undefined && src[prop]) { dest[prop] = src[prop]; } } catch (e) {} } return dest; } function isParentWindow() { try { return !!(parent.Window && capturingElement instanceof parent.Window); } catch (e) { return false; } } function isOverlayish(el) { var style = el && el.style; if (style && /fixed|absolute/.test(style.position) && el.offsetWidth >= winWidth * 0.6 && el.offsetHeight >= winHeight * 0.75) { return true; } return false; } var capturingElement = null; // the element who registered to the event var srcElement = null; // the clicked on element var closestParentLink = null; if (window.event != null) { capturingElement = window.event.currentTarget; srcElement = window.event.srcElement; } if (srcElement != null && srcElement instanceof HTMLElement) { closestParentLink = srcElement.closest('a'); if (closestParentLink && closestParentLink.href) { openWndArguments[3] = closestParentLink.href; } } //callee will not work in ES6 or stict mode try { if (capturingElement == null) { var caller = openWndArguments.callee; while (caller.arguments != null && caller.arguments.callee.caller != null) { caller = caller.arguments.callee.caller; } if (caller.arguments != null && caller.arguments.length > 0 && caller.arguments[0].currentTarget != null) { capturingElement = caller.arguments[0].currentTarget; } } } catch (e) {} ///////////////////////////////////////////////////////////////////////////////// // Blocked if a click on background element occurred ( or document) ///////////////////////////////////////////////////////////////////////////////// if (capturingElement == null) { window.pbreason = 'Blocked a new window opened without any user interaction'; useOriginalOpenWnd = false; } else if (capturingElement != null && (capturingElement instanceof Window || isParentWindow(capturingElement) || capturingElement === document || capturingElement.URL != null && capturingElement.body != null || capturingElement.nodeName != null && (capturingElement.nodeName.toLowerCase() == "body" || capturingElement.nodeName.toLowerCase() == "document"))) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because it was triggered by the ' + capturingElement.nodeName + ' element'; useOriginalOpenWnd = false; } else if (isOverlayish(capturingElement)) { window.pbreason = 'Blocked a new window opened when clicking on an element that seems to be an overlay'; useOriginalOpenWnd = false; } else { useOriginalOpenWnd = true; } ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Block if a full screen was just initiated while opening this url. ///////////////////////////////////////////////////////////////////////////////// var fullScreenElement = document.webkitFullscreenElement || document.mozFullscreenElement || document.fullscreenElement; if (new Date().getTime() - fullScreenOpenTime < 1000 || isNaN(fullScreenOpenTime) && isDocumentInFullScreenMode()) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because a full screen was just initiated while opening this url.'; /* JRA REMOVED if (window[script_params.fullScreenFnKey]) { window.clearTimeout(window[script_params.fullScreenFnKey]); } */ if (document.exitFullscreen) { document.exitFullscreen(); } else if (document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if (document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } useOriginalOpenWnd = false; } ///////////////////////////////////////////////////////////////////////////////// var openUrl = openWndArguments[0]; var inWhitelist = isInWhitelist(openUrl); if (inWhitelist) { useOriginalOpenWnd = true; } else if (isInBlacklist(openUrl)) { useOriginalOpenWnd = false; } if (useOriginalOpenWnd == true) { generatedWindow = originalWindowOpenFn.apply(this, openWndArguments); // save the window by name, for latter use. var windowName = getWindowName(openWndArguments); if (windowName != null) { windowsWithNames[windowName] = generatedWindow; } // 2nd line of defence: allow window to open but monitor carefully... ///////////////////////////////////////////////////////////////////////////////// // Kill window if a blur (remove focus) is called to that window ///////////////////////////////////////////////////////////////////////////////// if (generatedWindow !== window) { var openTime = new Date().getTime(); var originalWndBlurFn = generatedWindow.blur; generatedWindow.blur = function () { if (new Date().getTime() - openTime < 1000 && !inWhitelist /* one second */) { window.pbreason = 'Blocked a new window opened with URL: ' + openWndArguments[0] + ' because a it was blured'; generatedWindow.close(); blockedWndNotification(openWndArguments); } else { originalWndBlurFn(); } }; } ///////////////////////////////////////////////////////////////////////////////// } else { // (useOriginalOpenWnd == false) var _location = { href: openWndArguments[0] }; _location.replace = function (url) { _location.href = url; }; generatedWindow = { close: function close() { return true; }, test: function test() { return true; }, blur: function blur() { return true; }, focus: function focus() { return true; }, showModelessDialog: function showModelessDialog() { return true; }, showModalDialog: function showModalDialog() { return true; }, prompt: function prompt() { return true; }, confirm: function confirm() { return true; }, alert: function alert() { return true; }, moveTo: function moveTo() { return true; }, moveBy: function moveBy() { return true; }, resizeTo: function resizeTo() { return true; }, resizeBy: function resizeBy() { return true; }, scrollBy: function scrollBy() { return true; }, scrollTo: function scrollTo() { return true; }, getSelection: function getSelection() { return true; }, onunload: function onunload() { return true; }, print: function print() { return true; }, open: function open() { return this; }, opener: window, closed: false, innerHeight: 480, innerWidth: 640, name: openWndArguments[1], location: _location, document: { location: _location } }; copyMissingProperties(window, generatedWindow); generatedWindow.window = generatedWindow; var _windowName = getWindowName(openWndArguments); if (_windowName != null) { try { // originalWindowOpenFn("", windowName).close(); windowsWithNames[_windowName].close(); } catch (err) {} } var fnGetUrl = function fnGetUrl() { var url = void 0; if (!(generatedWindow.location instanceof Object)) { url = generatedWindow.location; } else if (!(generatedWindow.document.location instanceof Object)) { url = generatedWindow.document.location; } else if (_location.href != null) { url = _location.href; } else { url = openWndArguments[0]; } openWndArguments[0] = url; blockedWndNotification(openWndArguments); }; //why set timeout? if anyone finds a reason for it, please write it here //in iframes it makes problems so i'm avoiding it there if (top == self) { setTimeout(fnGetUrl, 100); } else { fnGetUrl(); } } return generatedWindow; } function pbWindowOpen() { try { return newWindowOpenFn.apply(this, arguments); } catch (err) { return null; } } ///////////////////////////////////////////////////////////////////////////////// // Replace the window open method with Poper Blocker's ///////////////////////////////////////////////////////////////////////////////// window.open = pbWindowOpen; ///////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////// // Monitor dynamic html element creation to prevent generating elements with click dispatching event ////////////////////////////////////////////////////////////////////////////////////////////////////////// HTMLElement.prototype.appendChild = function () { var newElement = originalAppendChildFn.apply(this, arguments); if (newElement.nodeName == 'IFRAME' && newElement.contentWindow) { try { var code = '(function () {\n var pb_blacklist = ' + JSON.stringify(pb_blacklist) + ';\n var pb_whitelist = ' + JSON.stringify(pb_whitelist) + ';\n ' + inject.toString() + ';\n inject();\n })();'; var s = document.createElement('script');s.text = code; newElement.contentWindow.document.body.appendChild(s); } catch (e) {} } return newElement; }; document.createElement = function () { var newElement = originalCreateElementFn.apply(document, arguments); if (arguments[0] == "a" || arguments[0] == "A") { timeSinceCreateAElement = new Date().getTime(); var originalDispatchEventFn = newElement.dispatchEvent; newElement.dispatchEvent = function (event) { if (event.type != null && ('' + event.type).toLocaleLowerCase() == "click") { if (!isInWhitelist(newElement.href)) { window.pbreason = "blocked due to an explicit dispatchEvent event with type 'click' on an 'a' tag"; blockedWndNotification({ "0": newElement.href }); return true; } } return originalDispatchEventFn.call(this, event); }; lastCreatedAElement = newElement; } return newElement; }; ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Block artificial mouse click on frashly created elements ///////////////////////////////////////////////////////////////////////////////// document.createEvent = function () { try { if (arguments[0].toLowerCase().includes("mouse") && new Date().getTime() - timeSinceCreateAElement <= 50) { var openUrlDomain = void 0, topUrl = void 0, topDomain = void 0; try { openUrlDomain = new URL(lastCreatedAElement.href).hostname; } catch (e) {} try { topUrl = window.location != window.parent.location ? document.referrer : document.location.href; } catch (e) {} try { topDomain = new URL(topUrl).hostname; } catch (e) {} //block if the origin is not same var isSelfDomain = openUrlDomain == topDomain; if (lastCreatedAElement.href.trim() && !isInWhitelist(lastCreatedAElement.href) && !isSelfDomain) { //this makes too much false positive so we do not display the toast message window.pbreason = 'Blocked because \'a\' element was recently created and ' + arguments[0] + ' event was created shortly after'; arguments[0] = lastCreatedAElement.href; blockedWndNotification({ "0": lastCreatedAElement.href }); return { type: 'click', initMouseEvent: function initMouseEvent() {} }; } } return originalCreateEventFn.apply(document, arguments); } catch (err) {} }; ///////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////// // Monitor full screen requests ///////////////////////////////////////////////////////////////////////////////// function onFullScreen(isInFullScreenMode) { if (isInFullScreenMode) { fullScreenOpenTime = new Date().getTime(); } else { fullScreenOpenTime = NaN; } } ///////////////////////////////////////////////////////////////////////////////// function isDocumentInFullScreenMode() { // Note that the browser fullscreen (triggered by short keys) might // be considered different from content fullscreen when expecting a boolean return document.fullScreenElement && document.fullScreenElement !== null || // alternative standard methods document.mozFullscreenElement != null || document.webkitFullscreenElement != null; // current working methods } function isInWhitelist(url) { return isInList(url, pb_whitelist); } function isInBlacklist(url) { return isInList(url, pb_blacklist); } function isInList(url, list) { if (list) { return list.some(function (li) { return new RegExp("https?://(www\.|.*\.)?" + li + "+").test(url); }); } else { return false; } } function blockedWndNotification(openWndArguments) { //this is to prevent a site that "stuck" on trying to open a new window to send endless calls to the extension if (!lastBlockTime || lastBlockTime < Date.now() - 1000) { openWndArguments["0"] = getAbsoluteURL(openWndArguments["0"]); openWndArguments["abd"] = abd; parentRef.postMessage({ type: "blockedWindow", args: JSON.stringify(openWndArguments) }, parentOrigin); } lastBlockTime = Date.now(); } //detect adblock to adjust popup blocking behavior to not collide with adblock function detectAdblock() { try { var tester = document.createElement('div'); tester.innerHTML = ' '; tester.className = 'adsbox'; tester.style.cssText = "position:absolute;top-1000px;left:-1000px;"; document.body.appendChild(tester); window.setTimeout(function () { if (tester.offsetHeight === 0) { abd = true; } tester.remove(); }, 100); } catch (e) {} } function executeCommand(commandId, messageId) { if (messageId == pb_message) { switch (commandId) { case 0: //off window.open = originalWindowOpenFn; document.createElement = originalCreateElementFn; document.createEvent = originalCreateEventFn; HTMLElement.prototype.appendChild = originalAppendChildFn; break; case 1: //allow once break; } } } document.addEventListener("fullscreenchange", function () { onFullScreen(document.fullscreen); }, false); document.addEventListener("mozfullscreenchange", function () { onFullScreen(document.mozFullScreen); }, false); document.addEventListener("webkitfullscreenchange", function () { onFullScreen(document.webkitIsFullScreen); }, false); //document.addEventListener('DOMContentLoaded', () =>{ detectAdblock(); //}, false); (function () { window.pbExternalCommand = function (commandId, messageId) { executeCommand(commandId, messageId); }; })(); }; inject(); })();