inline.js

Summary
inline.js
Constants
Tags of PGP’s blocks
Types of blocks
FireGPG.InlineThis class a system to detect and manage PGP block found in pages
Functions
HandleBlockThis function build a secure iframe for a PGP’s block, and add listeners for actions on this block
HandlePageThis function parse a page to find PGP’s block.
ignoreInnersThis is a function for .<HandlePage>, who try to avoid detection of PGP block into PGP blocks
ImportKeyThis is the function called when the user click on “Import” for a PGP’s key block
VerifySignatureThis is the function called when the user click on “Verify” for a PGP’s signed message block
DecryptMessageThis is the function called when the user click on “Decrypt” for a PGP’s encrypted message block
onPageLoadThis function is called when a page is loaded
initSystemThis function is called by FireGPG when a new Firefox’s windows is created.
mouseOverTrustedFunction called when the mouse is over a trusted block
mouseOutTrustedFunction called when a mouse is outside a trusted block
canIBeExecutedHereReturn true if we should handle pgp blocks on a page First, we use preferences for page, then domains, then global.
siteStatusReturn ‘OFF’ if we shouln’t handle block on the domain, ‘ON’ if we should, ‘’ if user don’t case
siteOnActivate the handiling of pgp block for a domain
siteOffDesactivate the handiling of pgp block for a domain
setSiteToActivate or desactivate the handiling of pgp block for a domain
pageStatusReturn ‘OFF’ if we shouln’t handle block on the page, ‘ON’ if we should, ‘’ if user don’t case
pageOnActivate the handiling of pgp block for a page
pageOffDesactivate the handiling of pgp block for a page

Constants

Tags of PGP’s blocks

FireGPG.Inline.Tags.PgpBlockStartStart of a PGP block
FireGPG.Inline.Tags.KeyStartStart of a PGP key
FireGPG.Inline.Tags.KeyEndEnd of a PGP key
FireGPG.Inline.Tags.PrivateKeyStartStart of a PGP private key
FireGPG.Inline.Tags.PrivateKeyEndEnd of a PGP private key
FireGPG.Inline.Tags.SignedMessageStartStart of a signed message
FireGPG.Inline.Tags.SignatureStartStart of a sign
FireGPG.Inline.Tags.SignatureEndEnd of a sign
FireGPG.Inline.Tags.EncryptedMessageStartStart of an encrypted message
FireGPG.Inline.Tags.EncryptedMessageEndEnd of an encrypted message

Types of blocks

FireGPG.Inline.KEY_BLOCKIt’s a key block
FireGPG.Inline.PRIVATE_KEY_BLOCKIt’s a private key block
FireGPG.Inline.SIGN_BLOCKIt’s a sign block
FireGPG.Inline.MESSAGE_BLOCKIt’s a message block

FireGPG.Inline

This class a system to detect and manage PGP block found in pages

Summary
Functions
HandleBlockThis function build a secure iframe for a PGP’s block, and add listeners for actions on this block
HandlePageThis function parse a page to find PGP’s block.
ignoreInnersThis is a function for .<HandlePage>, who try to avoid detection of PGP block into PGP blocks
ImportKeyThis is the function called when the user click on “Import” for a PGP’s key block
VerifySignatureThis is the function called when the user click on “Verify” for a PGP’s signed message block
DecryptMessageThis is the function called when the user click on “Decrypt” for a PGP’s encrypted message block
onPageLoadThis function is called when a page is loaded
initSystemThis function is called by FireGPG when a new Firefox’s windows is created.
mouseOverTrustedFunction called when the mouse is over a trusted block
mouseOutTrustedFunction called when a mouse is outside a trusted block
canIBeExecutedHereReturn true if we should handle pgp blocks on a page First, we use preferences for page, then domains, then global.
siteStatusReturn ‘OFF’ if we shouln’t handle block on the domain, ‘ON’ if we should, ‘’ if user don’t case
siteOnActivate the handiling of pgp block for a domain
siteOffDesactivate the handiling of pgp block for a domain
setSiteToActivate or desactivate the handiling of pgp block for a domain
pageStatusReturn ‘OFF’ if we shouln’t handle block on the page, ‘ON’ if we should, ‘’ if user don’t case
pageOnActivate the handiling of pgp block for a page
pageOffDesactivate the handiling of pgp block for a page

Functions

HandleBlock

FireGPG.Inline.HandleBlock = function(document,
range,
blockType)

This function build a secure iframe for a PGP’s block, and add listeners for actions on this block

Parameters

documentThe current document
rangeA range with the PGP block selected
blockTypeThe type of block, see <Types of blocs>

HandlePage

FireGPG.Inline.HandlePage = function(document)

This function parse a page to find PGP’s block.

Parameters

documentThe current document

ignoreInners

FireGPG.Inline.ignoreInners = function(idx,
end,
node)

This is a function for .<HandlePage>, who try to avoid detection of PGP block into PGP blocks

Parameters

idxThe current position of the block detection
endThe last position of the block detected
nodeThe node where we works

ImportKey

FireGPG.Inline.ImportKey = function(content,
block)

This is the function called when the user click on “Import” for a PGP’s key block

Parameters

contentThe PGP data.
blockThe block who contain the iframe

VerifySignature

FireGPG.Inline.VerifySignature = function(content,
block)

This is the function called when the user click on “Verify” for a PGP’s signed message block

Parameters

contentThe PGP data.
blockThe block who contain the iframe

DecryptMessage

FireGPG.Inline.DecryptMessage = function(content,
block)

This is the function called when the user click on “Decrypt” for a PGP’s encrypted message block

Parameters

contentThe PGP data.
blockThe block who contain the iframe

onPageLoad

FireGPG.Inline.onPageLoad = function(aEvent)

This function is called when a page is loaded

Parameters

aEventThe event of the loading

initSystem

FireGPG.Inline.initSystem = function()

This function is called by FireGPG when a new Firefox’s windows is created.

mouseOverTrusted

FireGPG.Inline.mouseOverTrusted = function(aEvent)

Function called when the mouse is over a trusted block

Parameters

aEventThe mouse over event

mouseOutTrusted

FireGPG.Inline.mouseOutTrusted = function(aEvent)

Function called when a mouse is outside a trusted block

Parameters

aEventThe mouseout event

canIBeExecutedHere

FireGPG.Inline.canIBeExecutedHere = function(aUrl)

Return true if we should handle pgp blocks on a page First, we use preferences for page, then domains, then global.

Parameters

aUrlThe url of the page

siteStatus

FireGPG.Inline.siteStatus = function(aUrl)

Return ‘OFF’ if we shouln’t handle block on the domain, ‘ON’ if we should, ‘’ if user don’t case

Parameters

aUrlThe url of the page

siteOn

FireGPG.Inline.siteOn = function(aUrl)

Activate the handiling of pgp block for a domain

Parameters

aUrlThe url of the page

siteOff

FireGPG.Inline.siteOff = function(aUrl)

Desactivate the handiling of pgp block for a domain

Parameters

aUrlThe url of the page

setSiteTo

FireGPG.Inline.setSiteTo = function(aUrl,
value)

Activate or desactivate the handiling of pgp block for a domain

Parameters

aUrlThe url of the page
valueON to activate, OFF to desactive

pageStatus

FireGPG.Inline.pageStatus = function(aUrl)

Return ‘OFF’ if we shouln’t handle block on the page, ‘ON’ if we should, ‘’ if user don’t case

Parameters

aUrlThe url of the page

pageOn

FireGPG.Inline.pageOn = function(aUrl)

Activate the handiling of pgp block for a page

Parameters

aUrlThe url of the page

pageOff

FireGPG.Inline.pageOff = function(aUrl)

Desactivate the handiling of pgp block for a page

Parameters

aUrlThe url of the page
FireGPG.Inline.HandleBlock = function(document,
range,
blockType)
This function build a secure iframe for a PGP’s block, and add listeners for actions on this block
FireGPG.Inline.HandlePage = function(document)
This function parse a page to find PGP’s block.
FireGPG.Inline.ignoreInners = function(idx,
end,
node)
This is a function for .<HandlePage>, who try to avoid detection of PGP block into PGP blocks
FireGPG.Inline.ImportKey = function(content,
block)
This is the function called when the user click on “Import” for a PGP’s key block
FireGPG.Inline.VerifySignature = function(content,
block)
This is the function called when the user click on “Verify” for a PGP’s signed message block
FireGPG.Inline.DecryptMessage = function(content,
block)
This is the function called when the user click on “Decrypt” for a PGP’s encrypted message block
FireGPG.Inline.onPageLoad = function(aEvent)
This function is called when a page is loaded
FireGPG.Inline.initSystem = function()
This function is called by FireGPG when a new Firefox’s windows is created.
FireGPG.Inline.mouseOverTrusted = function(aEvent)
Function called when the mouse is over a trusted block
FireGPG.Inline.mouseOutTrusted = function(aEvent)
Function called when a mouse is outside a trusted block
FireGPG.Inline.canIBeExecutedHere = function(aUrl)
Return true if we should handle pgp blocks on a page First, we use preferences for page, then domains, then global.
FireGPG.Inline.siteStatus = function(aUrl)
Return ‘OFF’ if we shouln’t handle block on the domain, ‘ON’ if we should, ‘’ if user don’t case
FireGPG.Inline.siteOn = function(aUrl)
Activate the handiling of pgp block for a domain
FireGPG.Inline.siteOff = function(aUrl)
Desactivate the handiling of pgp block for a domain
FireGPG.Inline.setSiteTo = function(aUrl,
value)
Activate or desactivate the handiling of pgp block for a domain
FireGPG.Inline.pageStatus = function(aUrl)
Return ‘OFF’ if we shouln’t handle block on the page, ‘ON’ if we should, ‘’ if user don’t case
FireGPG.Inline.pageOn = function(aUrl)
Activate the handiling of pgp block for a page
FireGPG.Inline.pageOff = function(aUrl)
Desactivate the handiling of pgp block for a page
Close