Advertisement
Guest User

Untitled

a guest
Mar 9th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. {
  2. "name": "My First Extension",
  3. "version": "1.0",
  4. "manifest_version": 2,
  5. "description": "The first extension that I made.",
  6. "browser_action": {
  7. "default_icon": "icon2.png"
  8. },
  9. "permissions": [
  10. "tabs", "https://login.live.com/"
  11. ],
  12. "content_scripts": [
  13. {
  14. "matches": ["https://login.live.com/"],
  15. "js": ["content.js"],
  16. "run_at": "document_end"
  17. }
  18. ],
  19. "web_accessible_resources": ["inject.js"]
  20. }
  21.  
  22. (function (chrome) {
  23. var js = document.createElement('script');
  24. js.type = 'text/javascript';
  25. js.src = chrome.extension.getURL('inject.js');
  26. document.getElementsByTagName('head')[0].appendChild(js);
  27. }(chrome));
  28.  
  29. (function () {
  30. console.log('test');
  31.  
  32.  
  33. alert("hello it work");
  34.  
  35. // define your username and password
  36. var myUsername = '';
  37. var myPassword = '';
  38.  
  39. // find the fiends in your login form
  40. var loginField = document.getelementsbyname('loginfmt');
  41. var passwordField = document.getelementsbyname('passwd');
  42.  
  43. // fill in your username and password
  44. loginField.value = myUsername;
  45. passwordField.value = myPassword;
  46.  
  47. // if you want, you can even automaticaly submit the login form
  48. var loginForm = document.getelementsbyname('SI');
  49. loginForm.submit();
  50.  
  51.  
  52. }());
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement