Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
liviavinci committed Oct 17, 2014
1 parent 1455e24 commit bca69bc
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,58 +3,58 @@ Boundary

Boundary is a CSS+Javascript library for Chrome extension developers to easily create HTML elements that won’t affect or be affected by the current webpage’s CSS. Strongly recommended if you are considering adding a sticker, a sidebar or any overlay box using content script.

/******************************** install boundary - manifest.json ********************************/

"content_scripts": [{
"matches": ["http://*/*", "https://*/*"],
"css": [
"boundary/boundary.css",
"your-stylesheet-for-boxes.css"
],
"js": [
"boundary/jquery.js",
"boundary/boundary.js",
"your-content-script-javascript.js"
],
"all_frames": false
}],
"web_accessible_resources": [
"boundary/boundary-extra.css",
"your-stylesheet-for-elements-within-box-one.css"
],

/******************************** install ********************************/

Take a look at Sample manifest.json.


/******************************** create a box ********************************/

Boundary.createBox(attrs);


/******************************** remove a box ********************************/

$(boxSelector).remove();


/******************************** style elements within a box ********************************/

Boundary.loadBoxCSS(boxSelector, CSSPath);


/******************************** find/modify a specific boxe ********************************/

Boundary.rewriteBox(boxSelector, HTML);

Boundary.appendToBox(boxSelector, HTML);

Boundary.prependToBox(boxSelector, HTML);


/******************************** find/modify elements within all boxes ********************************/

Boundary.find(elemSelector);

Boundary.rewrite(elemSelector, HTML);

Boundary.append(elemSelector, HTML);

Boundary.prepend(elemSelector, HTML);


/******************************** find/modify elements within a specific box ********************************/

Boundary.findElemInBox(elemSelector, boxSelector);

Boundary.rewriteElemInBox(elemSelector, boxSelector, HTML);

Boundary.appendToElemInBox(elemSelector, boxSelector, HTML);

Boundary.prependToElemInBox(elemSelector, boxSelector, HTML)


/******************************** helpers ********************************/

Boundary.findBoxBody(boxSelector);

0 comments on commit bca69bc

Please sign in to comment.