Raw Source
kalpdev.1 / Image reloader

// ==UserScript==
// @name     Image reloader
// @namespace     kalpsdj
// @author        Shjaisw
// @license       MIT
// @version       0.2
// @description   reload image multiple time and if not open direct to Image assist
// @include  https://*/dp/*
 // @match https://tt-test.amazon.com/*
// @updateURL https://openuserjs.org/meta/kalpdev.1/Image_reloader.meta.js
// @downloadURL https://openuserjs.org/install/kalpdev.1/Image_opener.user.js
// @include https://image-assist.amazon.com/vision/*
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @grant    GM_addStyle

// ==/UserScript==


$("body").append ( `
    <div id="guide">
<style>
div#guide {position:absolute;z-index:10000;top:27%; right:8px; }
</style>
    <html>


		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css">

		<!-- Compiled and minified JavaScript -->
		<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>

		<!-- Icons Included -->
		<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">

		<style>
			body{ margin:0px;	padding:0px;}
			.form-section{ padding: 10px 0;	}
.btn, .btn-large, .btn-small {
    text-decoration: none;
    color: #fff;
    background-color: #26a69a;
    text-align: center;
    -webkit-transition: background-color .2s ease-out;
    transition: background-color .2s ease-out;
    cursor: pointer;
}
.btn, .btn-large, .btn-small, .btn-floating, .btn-large, .btn-small, .btn-flat {
    font-size: 4px;
    outline: 0;
}
.btn, .btn-large, .btn-small, .btn-flat {
    border: none;
    border-radius: 5px;
    display: inline-block;
    height: 20px;
    text-align: left;
    line-height: 0px;
    padding: 0 0px;
    text-transform: uppercase;
    vertical-align: middle;
    -webkit-tap-highlight-color: transparent;
}
.card-panel {
    -webkit-transition: -webkit-box-shadow .25s;
    transition: -webkit-box-shadow .25s;
    transition: box-shadow .25s;
    transition: box-shadow .25s, -webkit-box-shadow .25s;
    padding: 4px;
    font-weight: 100;
    margin: 0rem 0 orem 0;
    border-radius: 5px;
    background-color: #fff;
}
		</style>

		<!-- Function to open multiple links -->
		<script>
		function openAllLinks(productID){
			var prod_id = productID;
			var i;
			var links = ["https://image-assist.amazon.com/vision/vision?asin="];

			for(i=0;i<links.length; i++)
			{
				var win = window.open(links[i]+prod_id, '_blank');
				if (win) {
					//if Browser has allowed it to be opened
					win.blur();
				} else {
					//Else Browser has blocked it
					alert('Please allow popups for this website');
				}
			}
		}
		</script>

	</head>
	<body>

	<div class="wrap">
		<section class="form-section">
			<div class="container">
				<div class="row">
					<div class="col s12 l12 m12 center-align">

					</div>

					<div class="col s12 l12 m12 center-align">
						<div class="row">
							<div class="col s12 m6 offset-m3">
								<div class="card-panel teal">
									<form action="https://paragon-na.amazon.com/" method="post" target="_blank" onsubmit="return openAllLinks(document.getElementById('prod_code').value);">
<form onsubmit="window.location.reload();">
										<input type="text" class="white-text" placeholder="ASIN" name="prod_code" id="prod_code" required>
										<br /><br />
										<button class="btn waves-effect waves-light" type="submit" name="action"> <i class="material-icons right">send</i></button>
									</form>
								</div>
							</div>
						</div>
					</div>

				</div>
			</div>
		</section>
	</div>

	</body>
</html>

` );
function shjaisw(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}

shjaisw (
	'h3#feedback { display: none; }'
	+
	'.vertical-space-150 { display: none; }'
    +
    '#fixed-header { display: none; }'
    +
    '#filter { display: none; }'
     +
    'fieldset { display: none; }'
     +
    'div#filtermessage.warning { display: none; }'
    +
    'h2#heading { display: none; }'
    +
    'div.a-box-inner { width: 100%; display: inline-block; background: #FFFDE7; }'
    +
    '.CSIForm { background-color: #ffe9bf; }'
     +
    'div#advancedoptionsmessage { display: none; }'
     +
    'div#buttonsdiv { display: none; }'
    +
    'table[id="productdata"] tbody tr.odd td { background-color: #FFFDE7; }'
    +
    'table[id="productdata"] thead tr .header { background-repeat: no-repeat; background-position: center right; cursor: pointer; background: #56c5d3; }'
    +
    'div#filterboxplaceholder { background: beige; text-align: center; font-size: x-large; }'
);