joserobleda  [ Profile ]

Sort by: Date / Title /

  1. 1 month ago
    NO ACABADO
    1. // ==UserScript==
    2. // @name           Gmail Signature
    3. // @namespace      http*://mail.google.com*
    4. // @description    AƱade automaticamente una firma a gmail
    5. // @include        http*://mail.google.com*
    6. // ==/UserScript==
    7.  
    8. //window._window = document.getElementById("canvas_frame").contentWindow;
    9. window.__change = function(data){
    10.  
    11.         if( data == "#compose" ){
    12.                 var canvasWindow = unsafeWindow.document.getElementById("canvas_frame").contentWindow;
    13.                 var composeWindow = canvasWindow.document.getElementsByTagName('iframe')[0].contentWindow;
    14.                 var composeBody = composeWindow.document.body;
    15.                 var currentValue = ( composeBody.innerHTML ) ? composeBody.innerHTML : "";
    16.                
    17.                 composeBody.innerHTML = 'MI TEXTO' + currentValue;
    18.         }
    19.         unsafeWindow.console.log(data);
    20.  
    21. };
    22. window.__check = function(){
    23.         try{
    24.                 if( unsafeWindow.__hash != unsafeWindow.location.hash ){
    25.                         unsafeWindow.__hash = unsafeWindow.location.hash;
    26.                         __change( unsafeWindow.__hash );
    27.                 }
    28.         }catch(e){};
    29. };
    30. window.__iniciar = function(){
    31.         try{
    32.                 if( unsafeWindow.gmonkey ){
    33.                         try{
    34.                                 if( document.getElementById("canvas_frame") ){
    35.                                         unsafeWindow.__hash = "";
    36.                                         //unsafeWindow.console.log( unsafeWindow.__hash  );
    37.                                         window.setInterval( function(){ __check(unsafeWindow);}, 1000 );
    38.                                 }
    39.                         }catch(e){};   
    40.                 } else {
    41.                         window.setTimeout( __iniciar, 1400 );
    42.                 }
    43.  
    44.         }catch(e){};
    45. };
    46. document.addEventListener("load", function(){
    47.         window.setTimeout(function(){
    48.                 __iniciar();
    49.         }, 1000);
    50. }, true);
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2042"></script>

First / Previous / Next / Last / Page 1 of 1 (1 posteets)