Created
April 25, 2019 16:29
-
-
Save drifterz28/27191e58cd73e96064af273ac16b7c37 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Team-Oregon | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @match https://app3.msi5.com/* | |
// @grant none | |
// ==/UserScript== | |
const AddGoogleCalLink = () => { | |
return `<a href="http://www.google.com/calendar/event? | |
action=TEMPLATE | |
&text=[event-title] | |
&dates=[start-custom format='Ymd\\THi00\\Z']/[end-custom format='Ymd\\THi00\\Z'] | |
&details=[description] | |
&ctz=America/Los_Angeles | |
&location=[location] | |
&trp=false | |
&sprop= | |
&sprop=name:" | |
target="_blank" rel="nofollow">Add to my calendar</a>`; | |
}; | |
const getTableRowInfo = row => { | |
console.log(row) | |
} | |
const buildGoogleCalLinks = () => { | |
const table = document.querySelector('.rgMasterTable'); | |
const tRows = table.querySelectorAll('.rgRow, .rgAltRow'); | |
[...tRows].forEach(getTableRowInfo); | |
}; | |
(function() { | |
'use strict'; | |
const RadTextBox1 = document.querySelector('#RadTextBox1'); | |
if(RadTextBox1 && RadTextBox1.value === 'My Schedule') { | |
buildGoogleCalLinks(); | |
} | |
})(); | |
/* | |
<a href="http://www.google.com/calendar/event? | |
action=TEMPLATE | |
&text=[event-title] | |
&dates=[start-custom format='Ymd\\THi00\\Z']/[end-custom format='Ymd\\THi00\\Z'] | |
&details=[description] | |
&ctz=America/Los_Angeles | |
&location=[location] | |
&trp=false | |
&sprop= | |
&sprop=name:" | |
target="_blank" rel="nofollow">Add to my calendar</a> | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment