I have a simple userscript that i am using to restyle a popup with tampermonkey in google chrome. Everything works fine in the tampermonkey extension however i need to install and maintain the script across multiple users browsers as such i am trying to host the file on our server and import and update by the url import and updates in tampermonkey if this is possible?
When i try to import by url i get 'invalid userscrip sry' popup and when i try to update the script on the server no updates are made even though i get an 'operation successful' popup.
I am new to using tampermonkey and userscripts and I cant seem to find where I am going wrong?
Here is my code:
// ==UserScript==
// @name zendesk-popup-style-changes
// @version 0.1
// @description Zendesk popup style changes for Essential E-Commerce LTD
// @author Aaron Sly
// @match https://essential-commerce.zendesk.com/*
// @grant none
// @downloadURL https://www.theheatingboutique.co.uk/zendesk-popup-style-changes.user.js
// ==/UserScript==
(function() {
'use strict';
function addGlobalStyle(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);
}
addGlobalStyle('div.jGrowl div.jGrowl-notification{ width: 400px; font-size:15px;background-color: #D6FFDF; animation: pulse 2s linear infinite, nudge 2s linear infinite; }');
addGlobalStyle('div.jGrowl div.jGrowl-notification.ui-state-alert a {border-bottom: 2px solid #FFA914;} ');
addGlobalStyle('div.jGrowl div.jGrowl-notification .jGrowl-close {opacity:1;}');
addGlobalStyle('@keyframes pulse { 0%, 100% { background-color: #FFC6C2; } 50% { background-color: #FFECEB; } }');
addGlobalStyle('@keyframes nudge { 0%, 50%, 60%, 100% { transform: translate(0, 0); } 25% { transform: translate(-1%, 0); } 55% {transform: translate(0.5%,0) } } ');
})();