HWM_SMS_Sound

Уведомление о почте (и кланрассылке, если включены уведомления)

  1. // ==UserScript==
  2. // @name HWM_SMS_Sound
  3. // @namespace Рианти
  4. // @description Уведомление о почте (и кланрассылке, если включены уведомления)
  5. // @include http://www.heroeswm.ru/*
  6. // @exclude /.+(battle|battlechat|frames|war|cgame|login|chat|chatonline|ch_box|chat_line|ticker|chatpost)\.php.*/
  7. // @exclude /.+daily\.heroeswm\.ru.+/
  8. // @version 1
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. if (!this.GM_getValue || (this.GM_getValue.toString && this.GM_getValue.toString().indexOf("not supported")>-1)) {
  13. this.GM_getValue = function (key, def) { return localStorage[key] || def; }
  14. this.GM_setValue = function (key, value) { return localStorage[key] = value; }
  15. this.GM_deleteValue = function (key) { return delete localStorage[key]; }
  16. }
  17.  
  18. var lastPlayed = GM_getValue('lastPlayed', '');
  19.  
  20. if(!lastPlayed){
  21. var _soundSrc = 'http://hwm.mcdir.ru/sounds/sms.mp3';
  22.  
  23. if (document.querySelector('img[src*="pismo.gif"]')){
  24. new Audio(_soundSrc).play();
  25. GM_setValue('lastPlayed', 1);
  26. }
  27. } else {
  28. if (!document.querySelector('img[src*="pismo.gif"]')){
  29. GM_deleteValue('lastPlayed');
  30. }
  31. }

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址