Class: Tay::Specification::ContentScript

Inherits:
Object
  • Object
show all
Defined in:
lib/tay/specification/content_script.rb

Overview

Represents a content script in your extension. For more information on valid values for attributes and pattern specications, check the docs.

code.google.com/chrome/extensions/content_scripts.html

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeContentScript

Returns a new instance of ContentScript.



33
34
35
36
37
38
# File 'lib/tay/specification/content_script.rb', line 33

def initialize
  @include_patterns = []
  @exclude_patterns = []
  @javascripts = []
  @stylesheets = []
end

Instance Attribute Details

#all_framesObject

Should this content script run in every frame on a page?



15
16
17
# File 'lib/tay/specification/content_script.rb', line 15

def all_frames
  @all_frames
end

#exclude_patternsObject

An array of patterns to exclude this content script on



23
24
25
# File 'lib/tay/specification/content_script.rb', line 23

def exclude_patterns
  @exclude_patterns
end

#include_patternsObject

An array of patterns to include this content script on



19
20
21
# File 'lib/tay/specification/content_script.rb', line 19

def include_patterns
  @include_patterns
end

#javascriptsObject

An array of script paths to inject



31
32
33
# File 'lib/tay/specification/content_script.rb', line 31

def javascripts
  @javascripts
end

#run_atObject

Specifies when to inject and run this content script.



11
12
13
# File 'lib/tay/specification/content_script.rb', line 11

def run_at
  @run_at
end

#stylesheetsObject

An array of stylesheet paths to inject



27
28
29
# File 'lib/tay/specification/content_script.rb', line 27

def stylesheets
  @stylesheets
end