Extensions
- Created scripts/extensions/README to describe samples. - Created sample extension scripts of each type.
This commit is contained in:
24
scripts/extensions/dom.lua
Normal file
24
scripts/extensions/dom.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
-- DOM Extension.
|
||||
-- Implementing 'system.load.average'.
|
||||
|
||||
-- Arguments: None
|
||||
-- Returns: An 8-element list of installation details. Only called once, on
|
||||
-- installation of the extension.
|
||||
function install ()
|
||||
return 'dom', -- Type
|
||||
'system.load.average', -- Name
|
||||
1.0, -- Version
|
||||
'Provides access to system load', -- Description
|
||||
'Paul Beckingham', -- Author
|
||||
'paul@beckingham.net', -- Contact
|
||||
'GPLv2', -- License
|
||||
'© 2011, Göteborg Bit Factory' -- Copyright
|
||||
end
|
||||
|
||||
-- Arguments: The DOM reference to evaluate
|
||||
-- Returns: The value from the DOM lookup
|
||||
-- Note: 'name' may include '*' wildcards
|
||||
function lookup (name)
|
||||
return 1.23 -- Fake load average
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user