Advertisement
Guest User

Untitled

a guest
Feb 3rd, 2012
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name           Select All
  3. // @namespace      Outlook Web Access
  4. // @description    Select All and delete
  5. // @include        *?Cmd=contents*
  6. // ==/UserScript==
  7.  
  8. // Add jQuery
  9. var GM_JQ = document.createElement('script');
  10. GM_JQ.src = 'http://jquery.com/src/jquery-latest.js';
  11. GM_JQ.type = 'text/javascript';
  12. document.getElementsByTagName('head')[0].appendChild(GM_JQ);
  13.  
  14. // Check if jQuery's loaded
  15. function GM_wait() {
  16.     if(typeof unsafeWindow.jQuery == 'undefined') { window.setTimeout(GM_wait,100); }
  17. else { $ = unsafeWindow.jQuery; letsJQuery(); }
  18. }
  19. GM_wait();
  20.  
  21. function buildSelectAll() {
  22.  
  23.          $(".List input[type='checkbox']").each(function() {
  24.             this.checked = true;
  25.          });
  26.  
  27.          unsafeWindow.SetCmd (unsafeWindow.msgViewer.CmdDelete.value);
  28.  
  29. }
  30.  
  31. // All your GM code must be inside this function
  32. function letsJQuery() {
  33.     buildSelectAll();
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement