从小书签到浏览器扩展的应用

1,895 views

Published on

特殊场景特殊运用,小书签加浏览器扩展,用于特殊应用。

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,895
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
25
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

从小书签到浏览器扩展的应用

  1. 1. 从 小书签 到  浏览器扩展 的应用 Vickey 
  2. 2. Bookmarklet Extenstion  Page ! 2
  3. 3. Bookmarklet/  1. 2. 3. Firebug javascript 4.   1. IE 2. 3. 4. Page ! 3
  4. 4. Page ! 4
  5. 5. Extenstion/  1. API I/O  2.  3.  4.  ...   1. API  2. ,  3.  4.  5.  ....Page ! 5
  6. 6. Page ! 6
  7. 7. MMPage ! 7
  8. 8. https/http php // JS jQuery js  html5shiv jQueryPage ! 8
  9. 9.  bookmarklet , !  balabala  sessionPage ! 9
  10. 10. Page ! 10
  11. 11. javascript:(function(x){ }) (window.xxx); Page ! 11
  12. 12. /debugger;/.test(location.href) console.log <script> <script data-ua=“IE8” ...></script> toggle Chrome extension Firefox add on zipPage ! 12
  13. 13.  bookmarklet Firebug Lite CSS Unit Test JS PV,UVPage ! 13
  14. 14. Chrome Hellow world n  manifest.json { “name”: “Monster”, // “description”: “Monster”, // “version”: “1.0.0”, // “background_page”: “background.html”, // “options_page”:“options.html”, // “content_scripts”: [ { // "matches": ["http://*/*","https://*/*"], “css”: [“monster.css”], // CSS “js”: [“monster.js”], // JS “run_at”:“document_end“ // } ], “icons”: { “16”: “logo.png”}, // "browser_action": {"default_icon": "logo.png", “default_title”: “Monster for Chrome”, // }, “permissions”: [“http://*/*”, “https://*/*”] // }Page ! 14
  15. 15. Chrome Hellow world n  background.html <script> chrome.browserAction.onClicked.addListener(function(tab) { //todo // bookmarklet }); chrome.extension.onRequest.addListener(function(request, sender, sendResponse){ //todo }) </script>n  xxx.js chrome.extension.sendRequest({action:single,sUrl:Monster.jsURL[i]}, function (response) { //todo }); Page ! 15
  16. 16. Chrome Hellow world n  n  Chrome --load-extension=c:myextention Page ! 16
  17. 17. Chrome Hellow world n  n Page ! 17
  18. 18. Chrome Hellow world n  Chrome Page ! 18
  19. 19. bookmarklet  bookmarlet+Page ! 19
  20. 20. Q&APage ! 20
  21. 21. n  Bookmarklet maker n  http://tools.w3clubs.com/bookmaker/n  Bookmarklet – n  http://www.appinn.com/bookmarklet ( )n  Print Friendly n  http://www.printfriendly.com/n  Design n  http://www.sprymedia.co.uk/article/Designn  Chrome extensions get started n  http://code.google.com/chrome/extensions/getstarted.htmln  Mozilla n  http://www.neatstudio.com/manual/firefox_ext/mozilla-ext.html( )n  .Page ! 21
  22. 22. Vickey http://t.sina.com/linrstudio 

×