Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- !function() {
- let $ = window.$;
- let _ajax = $.ajax;
- $.ajax = function(opt) {
- let req = _ajax.apply(this, arguments);
- if (typeof opt.url == "string" && opt.url.indexOf("engine?t=") > -1) onRequest(req);
- return req;
- };
- let __g = window._g;
- let lastArgs = [];
- window._g = function() {
- lastArgs = arguments;
- return __g.apply(this, arguments);
- };
- function onRequest(req) {
- setTimeout(() => {
- if (req.readyState != 4) {
- console.log("resend request");
- req.abort();
- g.ats = 0;
- __g.apply(window, lastArgs);
- };
- }, 5000);
- };
- }();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement