Orlygift Compact

Orlygift Compact Giveaway page (21/10/2016)

اعتبارا من 21-10-2016. شاهد أحدث إصدار.

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name			Orlygift Compact
// @namespace		MurkBRA
// @description		Orlygift Compact Giveaway page (21/10/2016)
// @author			MurkBRA
// @homepage		
// @icon			data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACoAAAAjCAYAAADizJiTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAU9SURBVHjavJhvTJVVHMc/F26EqFysQEsendFiwJatyCxfpDFWNmdu9iKbLmUyar2oN0ZNo5atiNjUzZTlalQbi1fGm9JFwlhZtmyaLrSANi/ChBw8OVT+3t58n3Y4Pc/lgd31287uOb/z+/N9zjm/3++cG0kkEsxEkUgEgDixecAuYDuwAhgGjgE1Du4ffrpxYoXAXuBJYCHwJ/AZ8L6DewMgFIawQAWyFXjUR+Rv4HEH97QFshT4Fsj20TkFlDm4I2EwpBGeagyQCeB3YETjbOBonNjtBshc4KgBckQ6HqqHtdKhKBTQOLE0oFLDSaDcw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XhiPcATAMuafCdpVRpvMeH1TwaNXgTuv2UKueVqfUDDxm3r5OGfhDQSmvsYbpkMmMC5X3NmBEY5lYkdKnAWPEfgZXAyzpn4+qv1Nx8Je0X9QD0uxmtkk/P/4jxBP8P1VtLP2hc9cxj4DlarEh9RsFhJ/ytmmuXbBCtkS9Ttz5ZdcjWOyVhPUEadaPJUUks0dv9qiI+R28rG+iQ5o5Ldo90M8VfK9uTll53wP9V06jE5+uStaeAzUnmN0smrL1BK6cnpWLgQkjDB4FblBvtuU7NHQxp64LxngpNWcCbAVuaMG78n+pWtNrawknxIpKZSGJnSL6ykj0/ZqJbVYNXq2JEtT2/6OwNWK+EOvVfBT4w5vKAJ1SdcgW8V1nhG6W8/5Vq1VJK/wwAXCVTS5Ic+DAAAAAASUVORK5CYII=
// @run-at			document-start
// @version			1.2016.10.21.0
// @grant			unsafeWindow
// @require			https://code.jquery.com/jquery-2.2.2.min.js
// @include			/^https?:\/\/(www\.)?orlygift\.com\/(giveaway|add_to_queue)/
// ==/UserScript==
/*/
/ lets make the timer alive and reload automatically on round end by Tackyou
$(function(){
	$('div.callout.callout-info strong:nth-of-type(2)').addClass('tempo');
	$('div.callout.callout-info strong:nth-of-type(1)').remove();
	$('div.callout.callout-info p').html('This page auto reload in ' + $('<strong class="tempo">').append($('*', 'div.callout.callout-info p')).html());
	var timelem = $('.tempo');
	if(timelem.length>0){
		var fetchtime = timelem.text();
		var hours = +(fetchtime.split(':')[0]), mins = +(fetchtime.split(':')[1].split(' h')[0]), secs = (hours * 3600 + mins * 60 + 90), currentSeconds = 0, currentMinutes = 0, currentHours = 0, count = setInterval(function() {
			currentHours = Math.floor(secs / 60 / 60);
			if(currentHours <= 9) currentHours = '0' + currentHours;
			currentMinutes = Math.floor(secs / 60) % 60;
			if(currentMinutes <= 9) currentMinutes = '0' + currentMinutes;
			currentSeconds = secs % 60;
			if(currentSeconds <= 9) currentSeconds = '0' + currentSeconds;
			secs--; 
			timelem.text(currentHours + 'h ' + currentMinutes + 'm ' + currentSeconds + 's');
			if(secs == -1){ clearInterval(count); location.reload(); }
    }, 1000);
  }
});
$(window).load(function() {
});*/

$("<style>").text([
	"/* Orlygift Compact*/",
	".showSweetAlert[data-animation=pop] {transform: scale(0.5) !important;-webkit-animation: inherit !important;animation: inherit !important;}",
	".col-md-offset-2.col-md-8 > br, .ng-scope > br, .sweet-overlay, .blocked-overlay, .alert-danger, #commander-cool-banner, #orlygift_tutorial, .showSweetAlert[data-animation=pop], .ad-container, #exit-intent-guest, #exit-intent-user, .modal-backdrop.fade.in, .box.box-dange, .slider.slick-initialized.slick-slider, footer, .row.headline-container.animated > div > h4, .row.headline-container.animated > div > h3, .row.headline-container.animated > div > p, .box.box-danger, .last_claimed, .product-img, .slider, .container.home-container > .row:not(.countdown-container):not(.animated), .content-perspective > .content > .content-inner .ng-scope > .row, .content-perspective > .content > .content-inner > .row > col-md-12, .nav.navbar-nav.hidden-xs, li.claimed {visibility: hidden !important; display: none !important;}",
	".container-fluid.game_page_background.ng-scope {margin-bottom: 40px !important;}",
	".products-list .product-info {margin-left: 0px !important;}",
	".stop-scrolling {overflow: inherit !important; height: inherit !important;}",
	".modal-open {overflow: auto !important;}",
	"#main {padding-bottom: 0 !important;overflow: inherit !important;}",
	".content-inner, .form-control {background: rgba(0, 52, 72, 0.7) !important;}",
	".event input[type='radio']:checked ~ .content-perspective .content-inner p, .products-list .product-description, .content-inner {color: #FFF !important;}",
	".event.finished .content-inner h3, .cc_container, .form-control, .form-control-feedback  {color: #000 !important;}",
	".btn-steam {color: #000 !important;background-color: #3E581B !important;}",
	".btn-steam:hover {color: #000 !important;background-color: #304515 !important;}",
	".cc_container {background: #003448 !important; border: #003448 !important;}",
	".form-control {border: 1px solid #4B4B4B !important;}",
	".form-control:focus {border: 1px solid #000 !important;}",
	".box, .products-list > .item {background: #00222F !important;}",
	".product-list-in-box > .item, .box-header.with-border {border-bottom: 1px solid #000 !important;}",
	".box-body {overflow: auto !important;max-height: 200px !important;}",
	".info-box {background: #00532D !important;}",
	".callout.callout-info {background: #1A6A82 !important;border-color: #004C5E !important;}",
	".callout.callout-warning {background: #EB9214 !important;border-color: #A06608 !important;}",
	".btn-info {background-color: #1A6A82 !important;}",
	".btn-info:hover {background-color: #16596D !important;}",
	"#raffle-enter-button {position: fixed !important;bottom: 0px !important;width: 100% !important;z-index: 99 !important;left: 0px !important;margin-bottom: 0px !important;}",
	".event label.arrow::after {background: #1a1a1a !important;}",
	".event input[type='radio']:checked ~ .thumb {box-shadow: 0px 0px 0px 8px #1A1A1A, 0px 1px 1px #000 !important;}",
	".callout.callout-success {border-color: #003A1F !important;background: #2A602A !important;}",
	".row.headline-container.animated {transform: scale(0.5);top: -30px;position: relative;}",
	".row.countdown-container {transform: scale(0.5);position: relative;top: -120px;}",
	".timeline {margin-bottom: -160px !important;top: -160px !important;padding: 0px 0px 0px !important;}",
	".popover {background-color: #003448 !important;}",
	".popover.top > .arrow::after {border-top-color: #003448 !important;}",
	".popover-title {background-color: #1A6A82 !important;border-bottom: 1px solid #000 !important;}",
	".btn-block + .btn-block {margin-top: 2px !important;}",
	".box-body {padding: 0px 10px !important;}",
	".box-header {padding: 3px !important;}",
	".products-list > .item {padding: 0px !important;}",
	".event:not(.finished) > .content-perspective > .content > .content-inner {padding: 1px 20px !important;}",
	".event:not(.finished):not(.desativado) > .content-perspective > .content > .content-inner h3:not(.popover-title) {padding: 0px 0px !important;}",
	".event:not(.finished):not(.desativado) > .content-perspective > .content > .content-inner::before {top: 13px !important;left: -26px !important;}",
	".content-inner::before {top: 6px !important;left: -26px !important;color: #4E5D6C !important; }",
	".content-inner {border-color: #4E5D6C !important;}",
	"@-moz-document url-prefix() {",
	".event:not(.finished):not(.desativado) > .content-perspective > .content > .content-inner::before {top: 16px !important;left: -36px !important;}",
	".content-inner::before {top: 9px !important;left: -36px !important;color: #4E5D6C !important; }",
	".content-inner {border-color: #4E5D6C !important;}",
	"}",
	".event input[type='radio']:checked ~ .content-perspective .content-inner::before {color: #E3000E !important;}",
	".event input[type='radio']:checked ~ .content-perspective .content-inner {border-color: #E3000E !important;}",
	".event {margin-bottom: 10px !important;}",
	".container {width: 1000px !important;}",
	".btn-box-tool {padding: 0px !important;}",
	".box-tools.pull-right {top: 1px !important;}",
	".box {border-top: 3px solid #0842B5 !important;}",
	".nav-tabs-custom > .nav-tabs > li.active > a, .nav-tabs-custom > .nav-tabs > li.active:hover > a {background-color: rgba(15,19,45,0.5) !important;color: #fff !important;}",
	".nav-tabs-custom > .tab-content {background: rgba(15, 19, 45, 0.5) !important;}",
	".nav-tabs-custom {background-color: rgba(26, 29, 56, 0.5) !important;}",
	".nav-tabs-custom > .nav-tabs > li > a {color: #999 !important;}",
	".nav-tabs-custom > .nav-tabs > li > a:hover {color: #fff !important;}",
	".nav-tabs-custom > .nav-tabs {border-bottom-color: #000 !important;}",
	".nav-tabs-custom > .nav-tabs > li.active > a {border-right-color: #000 !important;}",
	".event.desativado .thumb:before {width: 59px;top: 24px;}",
	".event.desativado .content-perspective:before {top: 35px;width: 38px;}",
	".event.desativado .content-inner {border-color: #1b2838 !important;}",
	".event.desativado .thumb {width: 50px;height: 50px;box-shadow: 0 0 0 4px #485563;background-size: 50px;left: 28px;top: 9px;}",
	".event.desativado input[type='radio'] + label:after {color: #1b2838;background: #5cb85c;}",
	".event.desativado label.arrow {top: 13px;}",
	".event.desativado .content-inner::before {color: #1b2838 !important;}",
	".sweet-alert {background-color: #232323 !important;}",
	".sweet-alert button.cancel:hover {background-color: #000 !important;}",
	".sweet-alert button.cancel {background-color: #111 !important;}",
	".sweet-alert button.confirm:hover {background-color: #001823 !important;}",
	".sweet-alert button.confirm {background-color: #001B27 !important;box-shadow: none !important;}",
	".navbar {background: rgba(51, 51, 51, 0.5) !important;background: linear-gradient(to bottom, rgba(78,93,108,0.5) 0%, rgba(56, 71, 85, 0.5) 100%) !important;background: -webkit-linear-gradient(top, rgba(78,93,108,0.5) 0%, rgba(56, 71, 85, 0.5) 100%) !important;}",
	"",
	""
].join("\n")).appendTo(document.documentElement);

$(function() {

	var count = setInterval(function() {
		if (!$('#time_left_countdown canvas').length) {
			clearInterval(count);
			setInterval(function() {
				location.reload();
			}, 20000);
			console.log('recarregando em 20s...');
		} else {
			console.log('checando...');
		}
	}, 1000);

	$('.event:not(.finished)').each(function() {
		if ($(this).has('.content-perspective.inactive').length) {
			$(this).addClass('desativado');
			console.log('adicionando classe');
		}
	});

	/*var count1 = setInterval(function() {
		if ($('.showSweetAlert[data-animation="pop"]').has('.sa-icon.sa-custom[style*="adblocker"]').length) {
			$('.showSweetAlert[data-animation="pop"]').remove();
			console.log('Popup removida');
		} else {
			//console.log('Checando');
			if ($('.sweet-alert.showSweetAlert.visible.show').length) {
				clearInterval(count1);
				console.log('Mostrar popup');
			} else {
				$('.showSweetAlert[data-animation="pop"].visible').addClass('show');
			}
		}
	}, 0);*/

	/*var vezes = 0;
	var count3 = setInterval(function() {
		if (++vezes >= 600) {
			clearInterval(count1);
			clearInterval(count3);
		} else {
			console.log('Não encontrado ' + vezes);
		}
	}, 100);*/
});

var count2 = setInterval(function() {
	if ($('.container-fluid.game_page_background.ng-scope').attr('style').length) {
		clearInterval(count2);
		$('body').attr('style', $('.container-fluid.game_page_background.ng-scope').attr('style') + ';background-position: center 54px;background-repeat: no-repeat;');
		$('.container-fluid.game_page_background.ng-scope').attr('style','');
	} 
}, 0);

//Verifica url (find by JoeSimmons)
String.prototype.find = function(s) {
	return (this.indexOf(s) != -1);
};

var url = window.location.href.toString();

if(url.find("add_to_queue") === true) window.location.replace(url.replace("add_to_queue", "giveaway"));
	else if(url.find("giveaway") === true) {
		for(var i=0,link; (link=document.links[i]); i++) {
			if(link.href.find("add_to_queue") === true) link.href = link.href.replace("add_to_queue", "giveaway");
		}
	}