From 6b74514c9046bfa98fb085bfcdb57a9fab455063 Mon Sep 17 00:00:00 2001 From: theberzer Date: Mon, 26 Nov 2018 16:30:05 +0100 Subject: [PATCH 1/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 991219b..870ad2a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Userscripts for CTR -This project contains userscripts to fix CTR system. +This project contains userscripts to fix CTR system in modern browsers ## Setup development environment -1. In order to use these scripts you need to install **tampermonkey** extension in your browser at https://tampermonkey.net/. +1. In order to use these scripts you need to install **tampermonkey** extension in your browser from https://tampermonkey.net/. 2. Enable tampermonkey in your browser after installing it. 3. To upload a userscript in tampermonkey first click on the file then click on the **Raw** button. It will redirect you at tampermonkey and ask you to install this userscript. After clicking **Install** button you will find the userscript in tampermonkey's dashboard. 4. Make sure the userscript is enabled. From e34722caad6b1a7c8e566601eb2cd98fd8ea92cb Mon Sep 17 00:00:00 2001 From: TheBerzer Date: Mon, 26 Nov 2018 16:37:00 +0100 Subject: [PATCH 2/3] Added more url matches Sometimes Tamper Monkey does not activate, added url matches for these cases. --- ctr_dropdowns.user.js | 29 +++++++++++++++-------------- ctr_table_styles.user.js | 6 ++++++ 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ctr_dropdowns.user.js b/ctr_dropdowns.user.js index a41de3c..d140f9a 100644 --- a/ctr_dropdowns.user.js +++ b/ctr_dropdowns.user.js @@ -1,25 +1,26 @@ // ==UserScript== -// @name CTR Userscript +// @name CTR style // @namespace http://tampermonkey.net/ // @version 0.1 -// @description fix dropdowns in CTR-> My Reports +// @description fix table styles in CTR-> Week // @author Erland // @match https://apps.ne.capgemini.com/Applications/CTR/ +// @match https://apps.ne.capgemini.com/Applications/ctr/ // @match https://apps.ne.capgemini.com/applications/CTR/ +// @match https://apps.ne.capgemini.com/applications/ctr/ +// @match https://apps-x.nordic.capgemini.com/Applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/Applications/ctr/ // @match https://apps-x.nordic.capgemini.com/applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/applications/ctr/ // @match https://apps.ne.capgemini.com/Applications//CTR/ +// @match https://apps.ne.capgemini.com/Applications//ctr/ // @grant none - // ==/UserScript== -window.onload = function() { - var frames = document.getElementsByName("FrameMain"); - frames.forEach(function(myFrame){ - var myFrameContent = (myFrame.contentWindow || myFrame.contentDocument); - var buttons = myFrameContent.document.body.querySelectorAll("button.fieldtxt3"); - buttons.forEach(function(element){ - element.addEventListener("click", function(event){ - event.preventDefault(); - }); - }); +var frames = document.getElementsByName("FrameMain"); +frames.forEach(function(myFrame){ + var myFrameContent = (myFrame.contentWindow || myFrame.contentDocument); + myFrame.addEventListener("load", function(event){ + myFrameContent.document.head.innerHTML = myFrameContent.document.head.innerHTML + ''; }); -} +}); + diff --git a/ctr_table_styles.user.js b/ctr_table_styles.user.js index b32650a..f861664 100644 --- a/ctr_table_styles.user.js +++ b/ctr_table_styles.user.js @@ -5,9 +5,15 @@ // @description fix table styles in CTR-> Week // @author Erland // @match https://apps.ne.capgemini.com/Applications/CTR/ +// @match https://apps.ne.capgemini.com/Applications/ctr/ // @match https://apps.ne.capgemini.com/applications/CTR/ +// @match https://apps.ne.capgemini.com/applications/ctr/ +// @match https://apps-x.nordic.capgemini.com/Applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/Applications/ctr/ // @match https://apps-x.nordic.capgemini.com/applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/applications/ctr/ // @match https://apps.ne.capgemini.com/Applications//CTR/ +// @match https://apps.ne.capgemini.com/Applications//ctr/ // @grant none // ==/UserScript== From dce4b6ad3f55826e28f087d59fba12fd0ec52460 Mon Sep 17 00:00:00 2001 From: TheBerzer Date: Mon, 26 Nov 2018 16:37:00 +0100 Subject: [PATCH 3/3] Added more url matches Sometimes Tamper Monkey does not activate, added url matches for these cases. --- ctr_dropdowns.user.js | 29 +++++++++++++++-------------- ctr_table_styles.user.js | 6 ++++++ 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/ctr_dropdowns.user.js b/ctr_dropdowns.user.js index a41de3c..d140f9a 100644 --- a/ctr_dropdowns.user.js +++ b/ctr_dropdowns.user.js @@ -1,25 +1,26 @@ // ==UserScript== -// @name CTR Userscript +// @name CTR style // @namespace http://tampermonkey.net/ // @version 0.1 -// @description fix dropdowns in CTR-> My Reports +// @description fix table styles in CTR-> Week // @author Erland // @match https://apps.ne.capgemini.com/Applications/CTR/ +// @match https://apps.ne.capgemini.com/Applications/ctr/ // @match https://apps.ne.capgemini.com/applications/CTR/ +// @match https://apps.ne.capgemini.com/applications/ctr/ +// @match https://apps-x.nordic.capgemini.com/Applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/Applications/ctr/ // @match https://apps-x.nordic.capgemini.com/applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/applications/ctr/ // @match https://apps.ne.capgemini.com/Applications//CTR/ +// @match https://apps.ne.capgemini.com/Applications//ctr/ // @grant none - // ==/UserScript== -window.onload = function() { - var frames = document.getElementsByName("FrameMain"); - frames.forEach(function(myFrame){ - var myFrameContent = (myFrame.contentWindow || myFrame.contentDocument); - var buttons = myFrameContent.document.body.querySelectorAll("button.fieldtxt3"); - buttons.forEach(function(element){ - element.addEventListener("click", function(event){ - event.preventDefault(); - }); - }); +var frames = document.getElementsByName("FrameMain"); +frames.forEach(function(myFrame){ + var myFrameContent = (myFrame.contentWindow || myFrame.contentDocument); + myFrame.addEventListener("load", function(event){ + myFrameContent.document.head.innerHTML = myFrameContent.document.head.innerHTML + ''; }); -} +}); + diff --git a/ctr_table_styles.user.js b/ctr_table_styles.user.js index b32650a..f861664 100644 --- a/ctr_table_styles.user.js +++ b/ctr_table_styles.user.js @@ -5,9 +5,15 @@ // @description fix table styles in CTR-> Week // @author Erland // @match https://apps.ne.capgemini.com/Applications/CTR/ +// @match https://apps.ne.capgemini.com/Applications/ctr/ // @match https://apps.ne.capgemini.com/applications/CTR/ +// @match https://apps.ne.capgemini.com/applications/ctr/ +// @match https://apps-x.nordic.capgemini.com/Applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/Applications/ctr/ // @match https://apps-x.nordic.capgemini.com/applications/CTR/ +// @match https://apps-x.nordic.capgemini.com/applications/ctr/ // @match https://apps.ne.capgemini.com/Applications//CTR/ +// @match https://apps.ne.capgemini.com/Applications//ctr/ // @grant none // ==/UserScript==