Class: Tay::Specification::ContentScript
- Inherits:
-
Object
- Object
- Tay::Specification::ContentScript
- 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.
Instance Attribute Summary collapse
-
#all_frames ⇒ Object
Should this content script run in every frame on a page?.
-
#exclude_patterns ⇒ Object
An array of patterns to exclude this content script on.
-
#include_patterns ⇒ Object
An array of patterns to include this content script on.
-
#javascripts ⇒ Object
An array of script paths to inject.
-
#run_at ⇒ Object
Specifies when to inject and run this content script.
-
#stylesheets ⇒ Object
An array of stylesheet paths to inject.
Instance Method Summary collapse
-
#initialize ⇒ ContentScript
constructor
A new instance of ContentScript.
Constructor Details
#initialize ⇒ ContentScript
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_frames ⇒ Object
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_patterns ⇒ Object
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_patterns ⇒ Object
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 |
#javascripts ⇒ Object
An array of script paths to inject
31 32 33 |
# File 'lib/tay/specification/content_script.rb', line 31 def javascripts @javascripts end |
#run_at ⇒ Object
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 |
#stylesheets ⇒ Object
An array of stylesheet paths to inject
27 28 29 |
# File 'lib/tay/specification/content_script.rb', line 27 def stylesheets @stylesheets end |