Advertisement
Guest User

Untitled

a guest
Mar 26th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. {
  2. "manifest_version": 2,
  3. "name": "Capslight",
  4. "description": "Highlight capital words",
  5. "version": "1.0",
  6. "content_scripts":
  7. [
  8. {
  9. "matches": ["http://*/*","https://*/*"],
  10. "js":["jquery.js", "myscript.js"],
  11. "run_at": "document_end"
  12. }
  13. ]
  14.  
  15. }
  16.  
  17. "matches": ["http://www.stackoverflow.com/*","http://www.superuser.com/*","https://google.co.uk/*"],
  18.  
  19. $('body').each(function(){
  20. var pattern = /([A-Z]{3,})/g;
  21. var before = '<span style="background: yellow;">';
  22. var after = '</span>';
  23. $(this).html($(this).html().replace(pattern, before+"$1"+after));
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement