-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdomruadpage.user.js
25 lines (23 loc) · 1.03 KB
/
domruadpage.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// ==UserScript==
// @name Skip domru ad pages
// @version 0.1.20200516.1
// @description skips domru ad pages
// @match *://info.ertelecom.ru/*
// @grant none
// @copyright 2017, StSav012
// @author StSav012
// @namespace http://info.ertelecom.ru/
// @run-at document-idle
// ==/UserScript==
"use strict";
var actualCode = '(' + function() {
"use strict";
var x = document.querySelectorAll("a.js-close, a.close, a.links_skip, table.es-content:first-child > tbody:first-child > tr:first-child > td:first-child > table:first-child > tbody:first-child > tr:first-child > td:first-child > table:first-child > tbody:first-child > tr:first-child > td:first-child > table:first-child > tbody:first-child > tr:first-child > td.es-m-txt-c:first-child > a:first-child");
if (x.length == 1) {
window.location = x[0].href;
}
return;
} + ')();';
var script = document.createElement('script');
script.textContent = actualCode;
(document.body||document.documentElement).appendChild(script);