Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function lalka() {
- // Получаем массив элементов
- var stickerArray = Array.from( document.querySelectorAll('.sticker') );
- // Если хотя бы один элемент есть в массиве
- if ( stickerArray.length ) {
- // Проходим циклам по всем элементам, делаем, что нам нужно
- stickerArray.forEach( function (sticker) {
- var stickerTitle = sticker.getAttribute('title');
- var arr = stickerTitle.split('\n').filter(str=>{return str.length > 0})
- let arr2 = ['Team Dignitas (Holo) | Katowice 2014', 'Virtus.Pro (Holo) | Katowice 2014', 'Vox Eminor (Holo) | Katowice 2014', 'Team LDLC.com (Holo) | Katowice 2014', 'Natus Vincere (Holo) | Katowice 2014', 'Clan-Mystik (Holo) | Katowice 2014', 'LGB eSports (Holo) | Katowice 2014', 'Fnatic (Holo) | Katowice 2014', 'Ninjas in Pyjamas (Holo) | Katowice 2014', 'iBUYPOWER | Katowice 2014', 'mousesports (Holo) | Katowice 2014', 'Reason Gaming | Katowice 2014', 'Titan | Katowice 2014', '3DMAX (Holo) | Katowice 2014', 'compLexity Gaming (Holo) | Katowice 2014', 'Vox Eminor | Katowice 2014', 'LGB eSports | Katowice 2014', 'ESL Wolf (Foil) | Katowice 2014', 'Natus Vincere | Katowice 2014', 'Team LDLC.com | Katowice 2014', 'Fnatic | Katowice 2014', 'ESL Skull (Foil) | Katowice 2014', 'Ninjas in Pyjamas | Katowice 2014', 'Virtus.Pro | Katowice 2014', 'compLexity Gaming | Katowice 2014', 'Team Dignitas | Katowice 2014', 'mousesports | Katowice 2014', 'Clan-Mystik | Katowice 2014', 'HellRaisers | Katowice 2014', '3DMAX | Katowice 2014', 'HellRaisers (Holo) | Katowice 2014', 'iBUYPOWER (Holo) | Katowice 2014', 'Reason Gaming (Holo) | Katowice 2014', 'Titan (Holo) | Katowice 2014', 'Howling Dawn', 'kennyS (Gold) | Krakow 2017', 'Crown (Foil)', 'shroud (Gold) | Krakow 2017', 'King on the Field', 'Vox Eminor (Holo) | Katowice 2015', 'Flammable (Foil)'];
- let obj = {};
- for (let i = 0; i < arr.length; i += 1) {
- if (arr2.includes(arr[i])) {
- obj[arr[i]] = true;
- }
- }
- if (Object.keys(obj).length){
- var notification = new Notification('Notification title', {
- icon: 'http://cdn.sstatic.net/stackexchange/img/logos/so/so-icon.png',
- body: Object.keys(obj)
- });
- }
- //Wear: 0% - Unscratched
- });
- // Проходим циклам по всем элементам, делаем, что нам нужно
- stickerArray.forEach( function (sticker) {
- var stickerTitle = sticker.getAttribute('title');
- var arr = stickerTitle.split('\n').filter(str=>{return str.length > 0})
- var nnn = arr.find(bbb => -1 != bbb.indexOf('sale'))
- });
- }
- }
- setTimeout(lalka, 350);
- setTimeout(function(){
- window.location.reload(1);
- }, 5600);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement