This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function () { | |
| const LIMIT = 5; | |
| const bcA = new BroadcastChannel('id'); | |
| const bcB = new BroadcastChannel('id'); | |
| let flag = false, count = 0; | |
| bcA.onmessage = () => { | |
| console.log('(。_+)\BroadcastChannel'); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const IPV4Reg = '((([0-9])|(1*[0-9][0-9])|(2[1-4][0-9])|(25[0-5]))\\.){3}(([0-9])|(1*[0-9][0-9])|(2[1-4][0-9])|(25[0-5]))'; | |
| const IP4 = `(^${IPV4Reg}$)|(^${IPV4Reg}\\:)|(^${IPV4Reg}\/)`; | |
| function getIPDomain(url) { | |
| const matches = new RegExp(IP4).exec(url); | |
| if (matches && matches[0]) { | |
| return matches[0].replace(/\:|\//, ''); | |
| } | |
| } |
NewerOlder