Показать сообщение отдельно
  #3 (permalink)  
Старый 01.06.2013, 19:42
Профессор
Отправить личное сообщение для Nexus Посмотреть профиль Найти все сообщения от Nexus
 
Регистрация: 04.12.2012
Сообщений: 3,706

Попробуй это:

// ==UserScript==
// @name        Test
// @namespace   Test
// @include     [url]http://site.ru*[/url]
// @version     1
// ==/UserScript==

var url=window.location.href;
if (url=='http://site.ru') {
	window.location.href='http://site.ru/index.php?op=start';
}

if (url=='http://site.ruindex.php?op=start') {
	setTimeout(function() {
		window.location.href='http://site.ru/index.php?op=stop';
	},40000);
}

if (url=='http://site.ruindex.php?op=stop') {
	setTimeout(function() {
		window.location.href='http://site.ru';
	},5000);	
}


Скрипт будет выполняться бесконечное кол-во раз.
Ответить с цитированием