SummerOfCode/2012/UserCSP/WeeklyUpdates/2012-05-21: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 1: Line 1:
<p><small><a href="WeeklyUpdates/{{#time:Y-m-d|{{SUBPAGENAME}} -1 week}}">« previous week</a> | <a href="WeeklyUpdates">index</a> | <a href="WeeklyUpdates/{{#time:Y-m-d|{{SUBPAGENAME}} +1 week}}">next week »</a></small>
<small>[[WeeklyUpdates/{{#time:Y-m-d|{{SUBPAGENAME}} -1 week}}|« previous week]] | [[WeeklyUpdates|index]] | [[WeeklyUpdates/{{#time:Y-m-d|{{SUBPAGENAME}} +1 week}}|next week »]]</small>
</p><p>__TOC__
 
</p>
__TOC__
<h3> This Week </h3>
 
<h3> Monday, <span class="fck_mw_template">{{#time:d F|{{SUBPAGENAME}}}}</span> </h3>
=== This Week ===
<ul><li> Database ("userCSP.sqlite") is created using third-party module "sqlite" for Jetpack.
 
</li></ul>
=== Monday, {{#time:d F|{{SUBPAGENAME}}}} ===
<ul><li> To store user defined policies for web site "userCSPTable" table is created in "userCSP.sqlite" database.  
 
</li></ul>
* Database ("userCSP.sqlite") is created using third-party module "sqlite" for Jetpack.
<ul><li> I modified the third-party "sqlite" module to operate on my custom database table. Such as "tableUsedOrNew" method is added to check whether "userCSPTable" table exits on user's computer or not. IF not then it create the table.
 
</li></ul>
* To store user defined policies for web site "userCSPTable" table is created in "userCSP.sqlite" database.  
<ul><li> The "userCSPTable" contains 11 columns. domainName, defaultSrc, scriptSrc, objectSrc, imgSrc, mediaSrc, styleSrc, frameSrc, fontSrc , xhrSrc, frameAncestors.
 
</li></ul>
* I modified the third-party "sqlite" module to operate on my custom database table. Such as "tableUsedOrNew" method is added to check whether "userCSPTable" table exits on user's computer or not. IF not then it create the table.
<ul><li> The data type of each field in the table is "text", and the "domainName" is the primary key to retrieve and store CSP policies from database.
 
</li></ul>
* The "userCSPTable" contains 11 columns. domainName, defaultSrc, scriptSrc, objectSrc, imgSrc, mediaSrc, styleSrc, frameSrc, fontSrc , xhrSrc, frameAncestors.
<h3> Tuesday, <span class="fck_mw_template">{{#time:d F|{{SUBPAGENAME}} +1 day}}</span> </h3>
 
<ul><li> To dynamically create entries for Domain Name select drop down box in the UI, I used "tabs" module.  
* The data type of each field in the table is "text", and the "domainName" is the primary key to retrieve and store CSP policies from database.
</li></ul>
 
<ul><li><ul><li> I registered for "ready" event listener of the "tabs" module. When this event listener fires, I retrieve the tab url string.
=== Tuesday, {{#time:d F|{{SUBPAGENAME}} +1 day}} ===
</li></ul>
 
</li></ul>
* To dynamically create entries for Domain Name select drop down box in the UI, I used "tabs" module.  
<ul><li><ul><li> I used "url" module to convert url string into URL object, so that I can retrieve its properties like host, scheme, port, etc.
 
</li></ul>
** I registered for "ready" event listener of the "tabs" module. When this event listener fires, I retrieve the tab url string.
</li></ul>
 
<ul><li><ul><li> From "ready" event listener of tabs, I send "host" name to the add-on UI component to add host name to the drop down select menu list.  
** I used "url" module to convert url string into URL object, so that I can retrieve its properties like host, scheme, port, etc.
</li></ul>
 
</li></ul>
** From "ready" event listener of tabs, I send "host" name to the add-on UI component to add host name to the drop down select menu list.  
<ul><li><ul><li> I also registered for "close" event listener in "tabs" module. This will send host name to add-on UI component to remove the host name from drop down select menu list. However, its coding is not yet completed.
 
</li></ul>
** I also registered for "close" event listener in "tabs" module. This will send hostname to add-on UI componenet to remove the host name from drop down select menu list. However, its coding is not yet completed.
</li></ul>
 
<h3> Wednesday, <span class="fck_mw_template">{{#time:d F|{{SUBPAGENAME}} +2 days}}</span> </h3>
=== Wednesday, {{#time:d F|{{SUBPAGENAME}} +2 days}} ===
<h3> Thursday, <span class="fck_mw_template">{{#time:d F|{{SUBPAGENAME}} +3 days}}</span> </h3>
 
<h3> Friday, <span class="fck_mw_template">{{#time:d F|{{SUBPAGENAME}} +4 days}}</span> </h3>
=== Thursday, {{#time:d F|{{SUBPAGENAME}} +3 days}} ===
 
=== Friday, {{#time:d F|{{SUBPAGENAME}} +4 days}} ===

Revision as of 05:22, 22 May 2012

<a href="WeeklyUpdates/2012-05-14">« previous week</a> | <a href="WeeklyUpdates">index</a> | <a href="WeeklyUpdates/2012-05-28">next week »</a>

This Week

Monday, 21 May

  • Database ("userCSP.sqlite") is created using third-party module "sqlite" for Jetpack.
  • To store user defined policies for web site "userCSPTable" table is created in "userCSP.sqlite" database.
  • I modified the third-party "sqlite" module to operate on my custom database table. Such as "tableUsedOrNew" method is added to check whether "userCSPTable" table exits on user's computer or not. IF not then it create the table.
  • The "userCSPTable" contains 11 columns. domainName, defaultSrc, scriptSrc, objectSrc, imgSrc, mediaSrc, styleSrc, frameSrc, fontSrc , xhrSrc, frameAncestors.
  • The data type of each field in the table is "text", and the "domainName" is the primary key to retrieve and store CSP policies from database.

Tuesday, 22 May

  • To dynamically create entries for Domain Name select drop down box in the UI, I used "tabs" module.
    • I registered for "ready" event listener of the "tabs" module. When this event listener fires, I retrieve the tab url string.
    • I used "url" module to convert url string into URL object, so that I can retrieve its properties like host, scheme, port, etc.
    • From "ready" event listener of tabs, I send "host" name to the add-on UI component to add host name to the drop down select menu list.
    • I also registered for "close" event listener in "tabs" module. This will send host name to add-on UI component to remove the host name from drop down select menu list. However, its coding is not yet completed.

Wednesday, 23 May

Thursday, 24 May

Friday, 25 May