irodexx

try to take over the world!

  1. // ==UserScript==
  2. // @name irodexx
  3. // @namespace http://tampermonkey.net/
  4. // @version 0.101
  5. // @description try to take over the world!
  6. // @author You
  7. // @match https://*.api.smartthings.com/api/smartapps/installations/*/launch
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // a function that loads jQuery and calls a callback function when jQuery has finished loading
  15. function addJQuery(callback) {
  16. var script = document.createElement("script");
  17. script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
  18. script.addEventListener('load', function() {
  19. var script = document.createElement("script");
  20. script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
  21. document.body.appendChild(script);
  22. }, false);
  23. document.body.appendChild(script);
  24. }
  25. // the guts of this userscript
  26. function main() {
  27. $.getScript("https://maps.googleapis.com/maps/api/js?key=AIzaSyAlFR9IWx_HfMinS3mJZhAvGEtz-uz0aAs", function() {
  28.  
  29. $('body').append('<iframe class="weather-iframe" src="https://www.meteoblue.com/en/weather/widget/daily/rancho-bernardo_united-states-of-america_5385913?geoloc=fixed&days=6&tempunit=FAHRENHEIT&windunit=KILOMETER_PER_HOUR&coloured=coloured&pictoicon=0&maxtemperature=0&maxtemperature=1&mintemperature=1&windspeed=0&windgust=0&winddirection=0&uv=0&humidity=0&precipitation=0&precipitationprobability=0&precipitationprobability=1&spot=0&pressure=0&layout=light" frameborder="0" scrolling="NO" allowtransparency="true" sandbox="allow-same-origin allow-scripts allow-popups" style="width: 216px;height: 170px"></iframe><div><!-- DO NOT REMOVE THIS LINK --><a href="https://www.meteoblue.com/en/weather/forecast/week/palo-alto-hills-golf-and-country-club_united-states-of-america_5380758?utm_source=weather_widget&utm_medium=linkus&utm_content=daily&utm_campaign=Weather%2BWidget" target="_blank">meteoblue</a></div>');
  30. $('body').append("<div class='weather-image-container'><div class='weather-image-container-inner'><div class='weather-image-container-radar'></div><div class='weather-image-container-road'></div><div class='weather-image-container-cities'></div><div class='weather-image-container-roads'></div></div></div>");
  31. var e2 = $('<div id="map" style="height:270px; width:340px; top: 383px; left: 386px;"></div>');
  32. $('body').append(e2);
  33. var e3 = $('<div id="map2" style="height:270px; width:150px; top: 113px; left: 731px;"></div>');
  34. $('body').append(e3);
  35.  
  36. var e4 = $('<div id="map3" style="height:270px; width:136px; top: -157px; left: 885px;"></div>');
  37. $('body').append(e4);
  38. var map = new google.maps.Map(document.getElementById('map'), {
  39. zoom: 11,
  40. center: {lat: 33.004994, lng: -117.181949},
  41. disableDefaultUI: true
  42. });
  43. var map2 = new google.maps.Map(document.getElementById('map2'), {
  44. zoom: 14,
  45. center: {lat: 33.069830, lng: -117.073052},
  46. disableDefaultUI: true
  47. });
  48. var map3 = new google.maps.Map(document.getElementById('map3'), {
  49. zoom: 8,
  50. center: {lat: 33.389088, lng: -117.562174},
  51. disableDefaultUI: true
  52. });
  53.  
  54. var trafficLayer = new google.maps.TrafficLayer();
  55. trafficLayer.setMap(map);
  56. var trafficLayer2 = new google.maps.TrafficLayer();
  57. trafficLayer2.setMap(map2);
  58. var trafficLayer3 = new google.maps.TrafficLayer();
  59. trafficLayer3.setMap(map3);
  60. });
  61. }
  62.  
  63. // load jQuery and execute the main function
  64. addJQuery(main);
  65. })();