Clock figuccio

clock ore minuti secondi data

当前为 2020-01-18 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Clock figuccio
  3. // @description clock ore minuti secondi data
  4. // @version 1.3
  5. // @include *
  6. // @noframes
  7. // @author figuccio
  8. // @grant GM_setValue
  9. // @grant GM_getValue
  10. // @grant GM_registerMenuCommand
  11. // @icon data:image/gif;base64,R0lGODlhEAAQAKECABEREe7u7v///////yH5BAEKAAIALAAAAAAQABAAAAIplI+py30Bo5wB2IvzrXDvaoFcCIBeeXaeSY4tibqxSWt2RuWRw/e+UQAAOw==
  12. // @namespace https://greasyfork.org/users/237458
  13. // ==/UserScript==
  14. /*inserire questo per disattivare alcune funzioni allinizio e alla fine del codice short long*/
  15. function updateClock() {
  16. let options = {'day':'2-digit','year':'numeric','month':'long','weekday':'long',hour:'2-digit',minute:'numeric',second:'numeric',hour12: false};
  17. let time = new Date().toLocaleString('it-IT', options);
  18. node.innerHTML = time;
  19. }
  20. let node = document.createElement('div');
  21. node.setAttribute("style", "bottom: ;padding:5px;background:red;color:white;font-family:sans-serif;font-size:15px;top:0;right:0;position:fixed;text-align:center;z-index:999999;border-radius:10px;border:2px solid blue;");
  22. document.body.appendChild(node);
  23. setInterval(() => updateClock(), 1000);
  24. //mostra nascondi time
  25. function myFunction1() {
  26. if (node.style.display === 'none') {
  27. node.style.display = 'block';
  28. } else {
  29. node.style.display = 'none';
  30. }
  31. }
  32. GM_registerMenuCommand("mostra/nascondi",myFunction1);
  33.  
  34.  
  35. function myFunction10() {
  36. if (node.style.margin === '590px 0px') {
  37. node.style.margin = '0px';
  38. } else {
  39. node.style.margin = '590px 0px';
  40. }
  41. }
  42. GM_registerMenuCommand("giu ►su ►",myFunction10);
  43.  
  44. function myFunction1f() {
  45. if (node.style.margin === '0px 1277px') {
  46. node.style.margin = '512px 1277px';
  47. } else {
  48. node.style.margin = '0px 1277px';
  49. }
  50. }
  51. GM_registerMenuCommand("left su◄left giu◄",myFunction1f);
  52.  
  53.  
  54.