Показать сообщение отдельно
  #4 (permalink)  
Старый 25.07.2015, 15:25
Аватар для jack3dm
Аспирант
Отправить личное сообщение для jack3dm Посмотреть профиль Найти все сообщения от jack3dm
 
Регистрация: 05.04.2015
Сообщений: 52

Немного подшаманил

<!DOCTYPE html>
<html>

	<head>
		<title>MILANUNCIOS</title>
		<style>
			.myButton{-moz-box-shadow:0 1px 0 0 #f0f7fa;-webkit-box-shadow:0 1px 0 0 #f0f7fa;box-shadow:0 1px 0 0 #f0f7fa;background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#33bdef),color-stop(1,#019ad2));background:-moz-linear-gradient(top,#33bdef 5%,#019ad2 100%);background:-webkit-linear-gradient(top,#33bdef 5%,#019ad2 100%);background:-o-linear-gradient(top,#33bdef 5%,#019ad2 100%);background:-ms-linear-gradient(top,#33bdef 5%,#019ad2 100%);background:linear-gradient(to bottom,#33bdef 5%,#019ad2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#33bdef', endColorstr='#019ad2', GradientType=0);background-color:#33bdef;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #057fd0;display:inline-block;cursor:pointer;color:#fff;font-family:Times New Roman;font-size:28px;font-weight:700;padding:45% 25% 5%;margin-left:18%;margin-right:auto;text-decoration:none;text-shadow:0 -1px 0 #5b6178}.myButton:hover{background:-webkit-gradient(linear,left top,left bottom,color-stop(.05,#019ad2),color-stop(1,#33bdef));background:-moz-linear-gradient(top,#019ad2 5%,#33bdef 100%);background:-webkit-linear-gradient(top,#019ad2 5%,#33bdef 100%);background:-o-linear-gradient(top,#019ad2 5%,#33bdef 100%);background:-ms-linear-gradient(top,#019ad2 5%,#33bdef 100%);background:linear-gradient(to bottom,#019ad2 5%,#33bdef 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#019ad2', endColorstr='#33bdef', GradientType=0);background-color:#019ad2}.myButton:active{position:relative;top:1px;background:url([url]http://cs622123.vk.me/v622123065/1789f/rStcU0r40T0.jpg[/url]) 50% 50% no-repeat}
		</style>
	</head>

	<body>
		<button onclick="openW()" class="myButton">CLICK ME :3</button>
		<script>
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////При клике на кнопку открываются следующие ссылки
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////Порой выскакивает ошибка, нужно зайти в раздел
/////////////////////////////////////Modificar mis anuncios, автоматом открывается
/////////////////////////////////////одно окно при клике и когда срабатывает время
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////
			function openW() {
    		window.open("http://www.milanuncios.com/mis-anuncios/");
    		window.open("http://www.milanuncios.com/renovar/?id=167095568");
    		window.open("http://www.milanuncios.com/renovar/?id=162660783");
    		window.open("http://www.milanuncios.com/renovar/?id=167064417");
    		window.open("http://www.milanuncios.com/renovar/?id=162521427");
    		window.open("http://www.milanuncios.com/renovar/?id=165202120");
    		window.open("http://www.milanuncios.com/renovar/?id=166183573");
    	}
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
///////////////////////////////////////////////////////Переменные отвечающие за время
///////////////////////////////////////////////////////hora01 это час ночи (01:00)	
///////////////////////////////////////////////////////hora17 это 5 часов дня (17:00)	
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////
var now = new Date();

var hora01 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 1, 0, 0, 0) - now;
var hora02 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 2, 0, 0, 0) - now;
var hora03 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 3, 0, 0, 0) - now;
var hora04 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 4, 0, 0, 0) - now;
var hora05 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 5, 0, 0, 0) - now;
var hora06 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 6, 0, 0, 0) - now;
var hora07 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 7, 0, 0, 0) - now;
var hora08 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 8, 0, 0, 0) - now;
var hora09 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 9, 0, 0, 0) - now;
var hora10 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 10, 0, 0, 0) - now;
var hora11 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 11, 0, 0, 0) - now;
var hora12 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 12, 0, 0, 0) - now;
var hora13 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 13, 0, 0, 0) - now;
var hora14 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 14, 0, 0, 0) - now;
var hora15 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 15, 0, 0, 0) - now;
var hora16 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 16, 0, 0, 0) - now;
var hora17 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 17, 0, 0, 0) - now;
var hora18 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 18, 0, 0, 0) - now;
var hora19 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 19, 0, 0, 0) - now;
var hora20 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 20, 0, 0, 0) - now;
var hora21 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 21, 0, 0, 0) - now;
var hora22 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 22, 0, 0, 0) - now;
var hora23 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 23, 0, 0, 0) - now;
var hora24 = new Date(now.getFullYear(), now.getMonth(), now.getDate(), 24, 0, 0, 0) - now;

if (hora01  < 0) { hora01 += 86400000; };
if (hora02  < 0) { hora02 += 86400000; };
if (hora03  < 0) { hora03 += 86400000; };
if (hora04  < 0) { hora04 += 86400000; };
if (hora05  < 0) { hora05 += 86400000; };
if (hora06  < 0) { hora06 += 86400000; };
if (hora07  < 0) { hora07 += 86400000; };
if (hora08  < 0) { hora08 += 86400000; };
if (hora09  < 0) { hora09 += 86400000; };
if (hora10  < 0) { hora10 += 86400000; };
if (hora11  < 0) { hora11 += 86400000; };
if (hora12  < 0) { hora12 += 86400000; };
if (hora13  < 0) { hora13 += 86400000; };
if (hora14  < 0) { hora14 += 86400000; };
if (hora15  < 0) { hora15 += 86400000; };
if (hora16  < 0) { hora16 += 86400000; };
if (hora17  < 0) { hora17 += 86400000; };
if (hora18  < 0) { hora18 += 86400000; };
if (hora19  < 0) { hora19 += 86400000; };
if (hora20  < 0) { hora20 += 86400000; };
if (hora21  < 0) { hora21 += 86400000; };
if (hora22  < 0) { hora22 += 86400000; };
if (hora23  < 0) { hora23 += 86400000; };
if (hora24  < 0) { hora24 += 86400000; };
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////		
//////////////////////////////////////////////Ссылка открывается когда приходит время
/////////////////////////////////////////////////////////////////////////////////////		
/////////////////////////////////////////////////////////////////////////////////////
setTimeout(function openW() {
    		window.open("http://www.milanuncios.com/mis-anuncios/");
    		window.open("http://www.milanuncios.com/renovar/?id=167095568");
    	}, hora01);//01:00

setTimeout(function openW() {
    		window.open("http://www.milanuncios.com/mis-anuncios/");
    		window.open("http://www.milanuncios.com/renovar/?id=162660783");
    	}, hora02);//02:00

setTimeout(function openW() {
    		window.open("http://www.milanuncios.com/mis-anuncios/");
    		window.open("http://www.milanuncios.com/renovar/?id=167064417");
    	}, hora03);//03:00

		</script>
	</body>
</html>
Ответить с цитированием