commit 7ad705fc3f839e3bb87ab296b0cdf7561ba9e3b5
parent d18312a8630bcb7f03158e7e5f749bb96cd5b250
Author: Marcel <MTRNord@users.noreply.github.com>
Date: Fri, 16 Dec 2016 22:45:09 +0100
Don't show searchterm if no searchterm is given
Diffstat:
| M | screencap.js | | | 112 | +++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------- |
1 file changed, 76 insertions(+), 36 deletions(-)
diff --git a/screencap.js b/screencap.js
@@ -480,42 +480,82 @@ function getDateTime(format) {
}
function addTimestamp(time) {
- if (maptype == "iitc") {
- page.evaluate(function(dateTime, search) {
- var water = document.createElement('p');
- water.id='watermark-ice';
- water.innerHTML = dateTime + ' - ' + search;
- water.style.position = 'absolute';
- water.style.color = '#3A539B';
- water.style.top = '0';
- water.style.zIndex = '4404';
- water.style.marginTop = '0';
- water.style.paddingTop = '0';
- water.style.left = '0';
- water.style.fontSize = '40px';
- water.style.opacity = '0.8';
- water.style.fontFamily = 'monospace';
- water.style.textShadow = '0px 1px 8px rgba(150, 150, 150, 1)';
- document.querySelectorAll('body')[0].appendChild(water);
- }, time, search);
- }else {
- page.evaluate(function(dateTime, search) {
- var water = document.createElement('p');
- water.id='watermark-ice';
- water.style.zIndex = '4404';
- water.innerHTML = dateTime + ' - ' + search;
- water.style.position = 'absolute';
- water.style.color = 'orange';
- water.style.top = '0';
- water.style.left = '0';
- water.style.fontSize = '40px';
- water.style.opacity = '0.8';
- water.style.marginTop = '0';
- water.style.paddingTop = '0';
- water.style.fontFamily = 'monospace';
- water.style.textShadow = '0px 1px 8px rgba(150, 150, 150, 1)';
- document.querySelectorAll('body')[0].appendChild(water);
- }, time, search);
+ if (search == "nix") {
+ if (maptype == "iitc") {
+ page.evaluate(function(dateTime, search) {
+ var water = document.createElement('p');
+ water.id='watermark-ice';
+ water.innerHTML = dateTime;
+ water.style.position = 'absolute';
+ water.style.color = '#3A539B';
+ water.style.top = '0';
+ water.style.zIndex = '4404';
+ water.style.marginTop = '0';
+ water.style.paddingTop = '0';
+ water.style.left = '0';
+ water.style.fontSize = '40px';
+ water.style.opacity = '0.8';
+ water.style.fontFamily = 'monospace';
+ water.style.textShadow = '0px 1px 8px rgba(150, 150, 150, 1)';
+ document.querySelectorAll('body')[0].appendChild(water);
+ }, time, search);
+ }else {
+ page.evaluate(function(dateTime, search) {
+ var water = document.createElement('p');
+ water.id='watermark-ice';
+ water.style.zIndex = '4404';
+ water.innerHTML = dateTime;
+ water.style.position = 'absolute';
+ water.style.color = 'orange';
+ water.style.top = '0';
+ water.style.left = '0';
+ water.style.fontSize = '40px';
+ water.style.opacity = '0.8';
+ water.style.marginTop = '0';
+ water.style.paddingTop = '0';
+ water.style.fontFamily = 'monospace';
+ water.style.textShadow = '0px 1px 8px rgba(150, 150, 150, 1)';
+ document.querySelectorAll('body')[0].appendChild(water);
+ }, time, search);
+ }
+ }else{
+ if (maptype == "iitc") {
+ page.evaluate(function(dateTime, search) {
+ var water = document.createElement('p');
+ water.id='watermark-ice';
+ water.innerHTML = dateTime + ' - ' + search;
+ water.style.position = 'absolute';
+ water.style.color = '#3A539B';
+ water.style.top = '0';
+ water.style.zIndex = '4404';
+ water.style.marginTop = '0';
+ water.style.paddingTop = '0';
+ water.style.left = '0';
+ water.style.fontSize = '40px';
+ water.style.opacity = '0.8';
+ water.style.fontFamily = 'monospace';
+ water.style.textShadow = '0px 1px 8px rgba(150, 150, 150, 1)';
+ document.querySelectorAll('body')[0].appendChild(water);
+ }, time, search);
+ }else {
+ page.evaluate(function(dateTime, search) {
+ var water = document.createElement('p');
+ water.id='watermark-ice';
+ water.style.zIndex = '4404';
+ water.innerHTML = dateTime + ' - ' + search;
+ water.style.position = 'absolute';
+ water.style.color = 'orange';
+ water.style.top = '0';
+ water.style.left = '0';
+ water.style.fontSize = '40px';
+ water.style.opacity = '0.8';
+ water.style.marginTop = '0';
+ water.style.paddingTop = '0';
+ water.style.fontFamily = 'monospace';
+ water.style.textShadow = '0px 1px 8px rgba(150, 150, 150, 1)';
+ document.querySelectorAll('body')[0].appendChild(water);
+ }, time, search);
+ }
}
}