وظائف AtKit

من ATbar Wiki
(الفرق بين المراجعتين)
اذهب إلى: تصفح, بحث
(وثائق الـ API)
سطر ٩: سطر ٩:
 
Get the version of AtKit (format: x.y.zzzz)
 
Get the version of AtKit (format: x.y.zzzz)
  
== AtKit.setName( name ) ==
+
== (AtKit.setName(name ==
 
المتغيرات : name (string)
 
المتغيرات : name (string)
 
Returns: void
 
Returns: void
سطر ١٥: سطر ١٥:
 
Set the name of the toolbar
 
Set the name of the toolbar
  
== AtKit.setAbout( html ) ==
+
== (AtKit.setAbout(html ==
 
Paramaters: html (string)
 
Paramaters: html (string)
 
Returns: void
 
Returns: void
سطر ٢١: سطر ٢١:
 
Set the text that will appear in the about dialog for the toolbar
 
Set the text that will appear in the about dialog for the toolbar
  
== AtKit.setLogo( src ) ==
+
== (AtKit.setLogo(src ==
 
Paramaters: src (string)
 
Paramaters: src (string)
 
Returns: void
 
Returns: void
سطر ٢٧: سطر ٢٧:
 
Set the logo to the src passed in
 
Set the logo to the src passed in
  
== AtKit.isRendered( ) ==
+
== ()AtKit.isRendered ==
 
Paramaters: none
 
Paramaters: none
 
Returns: bool
 
Returns: bool
سطر ٣٣: سطر ٣٣:
 
Returns a boolean value indicating whether the toolbar has been rendered
 
Returns a boolean value indicating whether the toolbar has been rendered
  
== AtKit.getResourceURL( ) ==
+
== ()AtKit.getResourceURL ==
 
Paramaters: none
 
Paramaters: none
 
Returns: string
 
Returns: string
سطر ٣٩: سطر ٣٩:
 
Get the URL for AtKit resources
 
Get the URL for AtKit resources
  
== AtKit.getPluginURL() ==
+
== ()AtKit.getPluginURL==
 
Paramaters: none
 
Paramaters: none
 
Returns: string
 
Returns: string
سطر ٤٥: سطر ٤٥:
 
Get the URL to the plugins server
 
Get the URL to the plugins server
  
== AtKit.setCSS( identifier, inlineStyle ) ==
+
== (AtKit.setCSS(identifier, inlineStyle==
 
Paramaters: identifier (string jQuery selector), inlineStyle (string)
 
Paramaters: identifier (string jQuery selector), inlineStyle (string)
 
Returns: void
 
Returns: void
سطر ٥١: سطر ٥١:
 
Set a CSS rule that will be applied to identifier using a jQuery identifier
 
Set a CSS rule that will be applied to identifier using a jQuery identifier
  
== AtKit.setLanguage( language ) ==
+
== (AtKit.setLanguage(language ==
 
Paramaters: language (string)
 
Paramaters: language (string)
 
Returns: void
 
Returns: void
سطر ٥٧: سطر ٥٧:
 
Set the language to be used by AtKit
 
Set the language to be used by AtKit
  
== AtKit.getLanguage() ==
+
== ()AtKit.getLanguage==
 
Paramaters: none
 
Paramaters: none
 
Returns: string
 
Returns: string
سطر ٦٣: سطر ٦٣:
 
Get the language AtKit is running in
 
Get the language AtKit is running in
  
== AtKit.addLocalisation( countrycode, key, value )==
+
== (AtKit.addLocalisation(countrycode, key, value==
 
Paramaters: Country code (string), Key (string), Value (string)
 
Paramaters: Country code (string), Key (string), Value (string)
 
Returns: void
 
Returns: void
سطر ٦٩: سطر ٦٩:
 
Add a localisation for ''countrycode'' for the ''key'' set to ''value''
 
Add a localisation for ''countrycode'' for the ''key'' set to ''value''
  
== AtKit.addLocalisationMap( countrycode, Object map )==
+
== (AtKit.addLocalisationMap(countrycode, Object map==
 
Paramaters: Country code (string), map (Object)
 
Paramaters: Country code (string), map (Object)
 
Returns: void
 
Returns: void
سطر ٧٥: سطر ٧٥:
 
Add a key-value pair array of localisations
 
Add a key-value pair array of localisations
  
== AtKit.localisation( key )==
+
== (AtKit.localisation(key==
 
Paramaters: key (string)
 
Paramaters: key (string)
 
Returns: string
 
Returns: string
سطر ٨١: سطر ٨١:
 
Get a localised string for key
 
Get a localised string for key
  
== AtKit.addFix( regex, function ) ==
+
== (AtKit.addFix(regex, function ==
 
Paramaters: regex (Regular expression), function (function)
 
Paramaters: regex (Regular expression), function (function)
 
Returns: void
 
Returns: void
سطر ٨٧: سطر ٨٧:
 
Add code to be run for a specific site. Regex is matched against site location, if it matches function will be run. Can be used to retroactively clean-up site HTML.
 
Add code to be run for a specific site. Regex is matched against site location, if it matches function will be run. Can be used to retroactively clean-up site HTML.
  
== AtKit.addScript( url[, callback] ) ==
+
== ([AtKit.addScript( url[, callback==
 
Paramaters: url (string), callback (function, optional)
 
Paramaters: url (string), callback (function, optional)
 
Returns: void
 
Returns: void
سطر ٩٣: سطر ٩٣:
 
Add a javascript file to the page. On successful insertion run callback
 
Add a javascript file to the page. On successful insertion run callback
  
== AtKit.addStylesheet( url, id ) ==
+
== (AtKit.addStylesheet( url, id==
 
Paramaters: url (string), id (string)
 
Paramaters: url (string), id (string)
 
Returns: void
 
Returns: void
سطر ٩٩: سطر ٩٩:
 
Add a CSS file to the page. Note: May be overriden by styles on page. Using .setCSS() is more reliable.
 
Add a CSS file to the page. Note: May be overriden by styles on page. Using .setCSS() is more reliable.
  
== AtKit.addFn( identifier, fn ) ==
+
== (AtKit.addFn( identifier, fn==
 
Paramaters: identifier (string, unique), fn (function)
 
Paramaters: identifier (string, unique), fn (function)
 
Returns: void
 
Returns: void
سطر ١٠٥: سطر ١٠٥:
 
Add a global function that can be run by any part of the toolbar or its plugins.
 
Add a global function that can be run by any part of the toolbar or its plugins.
  
== AtKit.addCloseFn( identifier, fn ) ==
+
== (AtKit.addCloseFn( identifier, fn==
 
Paramaters: identifier (string, unique), fn (function)
 
Paramaters: identifier (string, unique), fn (function)
 
Returns: void
 
Returns: void
سطر ١١١: سطر ١١١:
 
Add a function that will be called when the toolbar is exited.
 
Add a function that will be called when the toolbar is exited.
  
== AtKit.addResetFn( identifier, fn ) ==
+
== (AtKit.addResetFn( identifier, fn==
 
Paramaters: identifier (string, unique), fn (function)
 
Paramaters: identifier (string, unique), fn (function)
 
Returns: void
 
Returns: void
سطر ١١٧: سطر ١١٧:
 
Add a function that will be called when the toolbar is reset.
 
Add a function that will be called when the toolbar is reset.
  
== AtKit.addDialog( identifier, title, body ) ==
+
== (AtKit.addDialog( identifier, title, body ==
 
Paramaters: identifier (string, unique), title (string), body (string)
 
Paramaters: identifier (string, unique), title (string), body (string)
 
Returns: void
 
Returns: void
  
Add a dialog that can be called with AtKit.show()
+
()Add a dialog that can be called with AtKit.show
  
 
== AtKit.addButton( identifier, tooltip, icon, action[, dialogs[, functions[, options]]] ) ==
 
== AtKit.addButton( identifier, tooltip, icon, action[, dialogs[, functions[, options]]] ) ==
سطر ١٢٩: سطر ١٢٩:
 
Add a button to the toolbar
 
Add a button to the toolbar
  
== AtKit.removeButton( identifier ) ==
+
== (AtKit.removeButton(identifier==
 
Paramaters: identifier (string)
 
Paramaters: identifier (string)
 
Returns: void
 
Returns: void
سطر ١٣٥: سطر ١٣٥:
 
Remove a button from the toolbar with the specified identifier
 
Remove a button from the toolbar with the specified identifier
  
== AtKit.addSpacer( width ) ==
+
== (AtKit.addSpacer( width==
 
Paramaters: width (int)
 
Paramaters: width (int)
 
Returns: void
 
Returns: void
سطر ١٤١: سطر ١٤١:
 
Adds a spacer button. If width is specified it will add the spacer (same size as a button) the number of times specified by width.
 
Adds a spacer button. If width is specified it will add the spacer (same size as a button) the number of times specified by width.
  
== AtKit.addSeparator() ==
+
== ()AtKit.addSeparator==
 
Paramaters: none
 
Paramaters: none
 
Returns: void
 
Returns: void
سطر ١٤٧: سطر ١٤٧:
 
Adds a separator element after the currently inserted button
 
Adds a separator element after the currently inserted button
  
== AtKit.importPlugins( Array pluginArray[, callback] ) ==
+
== ([AtKit.importPlugins( Array pluginArray[, callback ==
 
Paramaters: pluginArray (Array), callback (callable)
 
Paramaters: pluginArray (Array), callback (callable)
 
Returns: void
 
Returns: void
سطر ١٥٣: سطر ١٥٣:
 
Add an array of plugins to AtKit
 
Add an array of plugins to AtKit
  
== AtKit.addPlugin( identifier ) ==
+
== (AtKit.addPlugin( identifier ==
 
Paramaters: identifier (string)
 
Paramaters: identifier (string)
 
Returns: void
 
Returns: void
سطر ١٥٩: سطر ١٥٩:
 
Add a plugin specified by ''identifier'' to the toolbar
 
Add a plugin specified by ''identifier'' to the toolbar
  
== AtKit.registerPlugin( identifier, plugin )==
+
== (AtKit.registerPlugin( identifier, plugin==
 
Paramaters: identifier (string), plugin (callable)
 
Paramaters: identifier (string), plugin (callable)
 
Returns: void
 
Returns: void
سطر ١٦٥: سطر ١٦٥:
 
Called by plugins to register themselves with AtKit.
 
Called by plugins to register themselves with AtKit.
  
== AtKit.getPluginMetadata( identifier ) ==
+
== (AtKit.getPluginMetadata( identifier==
 
Paramaters: identifier (string)
 
Paramaters: identifier (string)
 
Returns: plugin metadata (array)
 
Returns: plugin metadata (array)
سطر ١٧١: سطر ١٧١:
 
Get metadata associated with a particular plugin
 
Get metadata associated with a particular plugin
  
== AtKit.listPlugins()==
+
== ()AtKit.listPlugins==
 
Paramaters: none
 
Paramaters: none
 
Returns: array
 
Returns: array
سطر ١٧٧: سطر ١٧٧:
 
Return an array of loaded plugins
 
Return an array of loaded plugins
  
== AtKit.show( dialog[, callback] ) ==
+
== ([AtKit.show( dialog[, callback==
 
Paramaters: dialog (Object), callback (function)
 
Paramaters: dialog (Object), callback (function)
 
Returns: void
 
Returns: void
سطر ١٨٣: سطر ١٨٣:
 
Show a dialog object
 
Show a dialog object
  
== AtKit.message( data[, callback] ) ==
+
== ([AtKit.message( data[, callback==
 
Paramaters: dialog (string), callback (function)
 
Paramaters: dialog (string), callback (function)
 
Returns: void
 
Returns: void
سطر ١٨٩: سطر ١٨٩:
 
Show a dialog with the specified data
 
Show a dialog with the specified data
  
== AtKit.hideDialog()==
+
== ()AtKit.hideDialog==
 
Paramaters: none
 
Paramaters: none
 
Returns: void
 
Returns: void
سطر ١٩٥: سطر ١٩٥:
 
Hide a ''message'' or ''show'' dialog
 
Hide a ''message'' or ''show'' dialog
  
== AtKit.call( identifier[, args] ) ==
+
== ([AtKit.call( identifier[, args ==
 
Paramaters: identifier (string), args (multiple)
 
Paramaters: identifier (string), args (multiple)
 
Returns: result of function
 
Returns: result of function
  
Call a function specified in AtKit.addFn()
+
()Call a function specified in AtKit.addFn
  
== AtKit.set( key, value ) ==
+
== (AtKit.set( key, value ==
 
Paramaters: key (string), value (multiple)
 
Paramaters: key (string), value (multiple)
 
Returns: void
 
Returns: void
سطر ٢٠٧: سطر ٢٠٧:
 
Set temporary storage. Removed on page refresh.
 
Set temporary storage. Removed on page refresh.
  
== AtKit.get( key ) ==
+
== (AtKit.get( key ==
 
Paramaters: key (string)
 
Paramaters: key (string)
 
Returns: multiple
 
Returns: multiple
  
Get value set by AtKit.set()
+
()Get value set by AtKit.set
  
== AtKit.storageAvailable( ) ==
+
== ()AtKit.storageAvailable==
 
Paramaters: none
 
Paramaters: none
 
Returns: boolean
 
Returns: boolean
سطر ٢٢٥: سطر ٢٢٥:
 
Get / Set persistent storage for current page. Uses HTML5 localStorage.
 
Get / Set persistent storage for current page. Uses HTML5 localStorage.
  
== AtKit.clearStorage( ) ==
+
== ()AtKit.clearStorage==
 
Paramaters: none
 
Paramaters: none
 
Returns: void
 
Returns: void
  
Clear ALL the HTML5 localStorage objects set by AtKit.storage()
+
()Clear ALL the HTML5 localStorage objects set by AtKit.storage
  
== AtKit.lib( ) ==
+
== ()AtKit.lib ==
 
Paramaters: none
 
Paramaters: none
 
Returns: jQuery
 
Returns: jQuery
سطر ٢٣٧: سطر ٢٣٧:
 
Return the jQuery library used by AtKit
 
Return the jQuery library used by AtKit
  
== AtKit.render( ) ==
+
== ()AtKit.render==
 
Paramaters: none
 
Paramaters: none
 
Returns: void
 
Returns: void
سطر ٢٤٣: سطر ٢٤٣:
 
Renders the toolbar once it has been set up
 
Renders the toolbar once it has been set up
  
== AtKit.setDebugger( fn ) ==
+
== (AtKit.setDebugger( fn ==
 
Paramaters: fn (callable)
 
Paramaters: fn (callable)
 
Returns: void
 
Returns: void
سطر ٢٤٩: سطر ٢٤٩:
 
Sets a callback to be run when a debug event is triggered.
 
Sets a callback to be run when a debug event is triggered.
  
== AtKit.close( ) ==
+
== ()AtKit.close ==
 
Paramaters: none
 
Paramaters: none
 
Returns: void
 
Returns: void
سطر ٢٥٥: سطر ٢٥٥:
 
Stop the toolbar.
 
Stop the toolbar.
  
== AtKit.reset( ) ==
+
== ()AtKit.reset==
 
Paramaters: none
 
Paramaters: none
 
Returns: void
 
Returns: void
  
 
Reset the toolbar
 
Reset the toolbar

مراجعة ١٧:٠٧، ٢٥ نوفمبر ٢٠١٢


محتويات

وثائق الـ API

()AtKit.getVersion

المتغيرات : none Returns: string

Get the version of AtKit (format: x.y.zzzz)

(AtKit.setName(name

المتغيرات : name (string) Returns: void

Set the name of the toolbar

(AtKit.setAbout(html

Paramaters: html (string) Returns: void

Set the text that will appear in the about dialog for the toolbar

(AtKit.setLogo(src

Paramaters: src (string) Returns: void

Set the logo to the src passed in

()AtKit.isRendered

Paramaters: none Returns: bool

Returns a boolean value indicating whether the toolbar has been rendered

()AtKit.getResourceURL

Paramaters: none Returns: string

Get the URL for AtKit resources

()AtKit.getPluginURL

Paramaters: none Returns: string

Get the URL to the plugins server

(AtKit.setCSS(identifier, inlineStyle

Paramaters: identifier (string jQuery selector), inlineStyle (string) Returns: void

Set a CSS rule that will be applied to identifier using a jQuery identifier

(AtKit.setLanguage(language

Paramaters: language (string) Returns: void

Set the language to be used by AtKit

()AtKit.getLanguage

Paramaters: none Returns: string

Get the language AtKit is running in

(AtKit.addLocalisation(countrycode, key, value

Paramaters: Country code (string), Key (string), Value (string) Returns: void

Add a localisation for countrycode for the key set to value

(AtKit.addLocalisationMap(countrycode, Object map

Paramaters: Country code (string), map (Object) Returns: void

Add a key-value pair array of localisations

(AtKit.localisation(key

Paramaters: key (string) Returns: string

Get a localised string for key

(AtKit.addFix(regex, function

Paramaters: regex (Regular expression), function (function) Returns: void

Add code to be run for a specific site. Regex is matched against site location, if it matches function will be run. Can be used to retroactively clean-up site HTML.

([AtKit.addScript( url[, callback

Paramaters: url (string), callback (function, optional) Returns: void

Add a javascript file to the page. On successful insertion run callback

(AtKit.addStylesheet( url, id

Paramaters: url (string), id (string) Returns: void

Add a CSS file to the page. Note: May be overriden by styles on page. Using .setCSS() is more reliable.

(AtKit.addFn( identifier, fn

Paramaters: identifier (string, unique), fn (function) Returns: void

Add a global function that can be run by any part of the toolbar or its plugins.

(AtKit.addCloseFn( identifier, fn

Paramaters: identifier (string, unique), fn (function) Returns: void

Add a function that will be called when the toolbar is exited.

(AtKit.addResetFn( identifier, fn

Paramaters: identifier (string, unique), fn (function) Returns: void

Add a function that will be called when the toolbar is reset.

(AtKit.addDialog( identifier, title, body

Paramaters: identifier (string, unique), title (string), body (string) Returns: void

()Add a dialog that can be called with AtKit.show

AtKit.addButton( identifier, tooltip, icon, action[, dialogs[, functions[, options]]] )

Paramaters: identifier (string, unique), tooltip (string), icon (string url), action (function), dialogs (Object), functions (Object), options (Object) Returns: void

Add a button to the toolbar

(AtKit.removeButton(identifier

Paramaters: identifier (string) Returns: void

Remove a button from the toolbar with the specified identifier

(AtKit.addSpacer( width

Paramaters: width (int) Returns: void

Adds a spacer button. If width is specified it will add the spacer (same size as a button) the number of times specified by width.

()AtKit.addSeparator

Paramaters: none Returns: void

Adds a separator element after the currently inserted button

([AtKit.importPlugins( Array pluginArray[, callback

Paramaters: pluginArray (Array), callback (callable) Returns: void

Add an array of plugins to AtKit

(AtKit.addPlugin( identifier

Paramaters: identifier (string) Returns: void

Add a plugin specified by identifier to the toolbar

(AtKit.registerPlugin( identifier, plugin

Paramaters: identifier (string), plugin (callable) Returns: void

Called by plugins to register themselves with AtKit.

(AtKit.getPluginMetadata( identifier

Paramaters: identifier (string) Returns: plugin metadata (array)

Get metadata associated with a particular plugin

()AtKit.listPlugins

Paramaters: none Returns: array

Return an array of loaded plugins

([AtKit.show( dialog[, callback

Paramaters: dialog (Object), callback (function) Returns: void

Show a dialog object

([AtKit.message( data[, callback

Paramaters: dialog (string), callback (function) Returns: void

Show a dialog with the specified data

()AtKit.hideDialog

Paramaters: none Returns: void

Hide a message or show dialog

([AtKit.call( identifier[, args

Paramaters: identifier (string), args (multiple) Returns: result of function

()Call a function specified in AtKit.addFn

(AtKit.set( key, value

Paramaters: key (string), value (multiple) Returns: void

Set temporary storage. Removed on page refresh.

(AtKit.get( key

Paramaters: key (string) Returns: multiple

()Get value set by AtKit.set

()AtKit.storageAvailable

Paramaters: none Returns: boolean

Returns whether the current browser supports AtKit.storage() (HTML5 storage)

AtKit.storage( key[, value] )

Paramaters: key (string, unique), value (string) Returns: bool if value present, otherwise value (multiple)

Get / Set persistent storage for current page. Uses HTML5 localStorage.

()AtKit.clearStorage

Paramaters: none Returns: void

()Clear ALL the HTML5 localStorage objects set by AtKit.storage

()AtKit.lib

Paramaters: none Returns: jQuery

Return the jQuery library used by AtKit

()AtKit.render

Paramaters: none Returns: void

Renders the toolbar once it has been set up

(AtKit.setDebugger( fn

Paramaters: fn (callable) Returns: void

Sets a callback to be run when a debug event is triggered.

()AtKit.close

Paramaters: none Returns: void

Stop the toolbar.

()AtKit.reset

Paramaters: none Returns: void

Reset the toolbar

أدوات شخصية

المتغيرات
النطاقات
أفعال
إبحار
Languages
صندوق الأدوات