Cr24 {"content_scripts": [{"matches": ["chrome://newtab/*"], "run_at": "document_start", "js": ["CustomNewTab.js"]}], "description": "Customize your new tab page.", "format_version": 1, "toolstrips": ["CustomNewTab_toolstrip.html"], "version": "0.2", "zip_hash": "1064f5b125cacb4175da38cb32819643a638d752f7797192b824962c4df2a160", "id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2", "name": "CustomNewTab"}PK Gz:eB B
config.xml
0
http://www.google.com/
false
false
false
false
PK -x: -\; ; CustomNewTab.jsvar maxWaitTime = 1000;
var currentWait = 0;
console.debug("CS: Initiating... ");
init();
var myport = chrome.extension.connect();
myport.onMessage.addListener(handleMessage);
function handleMessage(settings) {
console.debug("CS: Handling received settings...");
console.debug(settings);
console.debug("CS: Start customizing...");
console.debug(settings);
customizeNewTab(settings);
console.debug("CS: Done customizing...");
if(settings["displayAnotherPageInstead"] != "1"){
showBody();
}
console.debug("CS: Done handling received settings...");
}
function init() {
var theBody = document.body;
if(theBody == null){
console.debug("CS: Body not loaded yet...");
if(currentWait < maxWaitTime){
currentWait++;
window.setTimeout(init,1);
} else {
currentWait=0;
}
return;
}
console.debug("CS: Hiding body...");
theBody.style.display = "none";
console.debug("CS: Sending message...");
myport.postMessage("getsettings");
console.debug("CS: Done sending message...");
}
function showBody() {
console.debug("CS: Showing body...");
document.body.style.display = "block";
}
function customizeNewTab(settings) {
if(document.body == null)
{
console.debug("CS: Cannot customize, no body");
window.setTimeout(customizeNewTab,1,settings);
return;
}
if(settings['displayAnotherPageInstead']=="1"){
console.debug("CS: Redirecting");
window.location = settings['pageToDisplayURL'];
return;
}
if(settings['displayAnotherPageInstead']=="2"){
console.debug("CS: Adding IFrame");
addPageIFrame(settings['pageToDisplayURL']);
}
if(settings['hideMostVisited'] == "true")
removeDiv("mostvisitedsection");
if(settings['hideSearches'] == "true")
hideDiv("searches");
if(settings['hideRecentBookmarks'] == "true")
hideDiv("recentlyBookmarked");
if(settings['hideRecentlyClosedTabs'] == "true")
hideDiv("recentlyClosedTabs");
}
function hideDiv(divName){
var theDiv = document.getElementById(divName);
if(theDiv == null){
if(currentWait < maxWaitTime){
currentWait++;
window.setTimeout(hideDiv,1,divName);
} else {
currentWait=0;
}
return;
}
theDiv.style.visibility = "hidden";
}
function removeDiv(divName){
var theDiv = document.getElementById(divName);
if(theDiv == null){
if(currentWait < maxWaitTime){
currentWait++;
window.setTimeout(removeDiv,1,divName);
} else {
currentWait=0;
}
return;
}
theDiv.parentNode.removeChild(theDiv);
}
function addPageIFrame(theURL){
frame = document.createElement("IFRAME");
frame.setAttribute("src", theURL);
frame.style.width = 100+"%";
frame.style.height = 50+"%";
var theBody = document.body;
if(theBody == null){
if(currentWait < maxWaitTime){
currentWait++;
window.setTimeout(addPageIFrame,1,theURL);
} else {
return;
}
} else {
theBody.insertBefore(frame, theBody.firstChild);
}
}PK `:Pܣ CustomNewTab_toolstrip.html
PK v:1E E
dashboard.css
* {
margin:0px;
padding:0px;
}
body {
font-family:Verdana;
color:black;
}
#container {
width:800px;
margin: 10px auto;
}
#container div {
width:100%;
margin:0px;
padding:0px;
}
#header {
background-image:url(ui/header.png);
height:13px;
}
#content {
background-image:url(ui/background.png);
}
#content table{
width:70%;
margin-left:auto;
margin-right:auto;
}
#footer {
background-image:url(ui/footer.png);
height:13px;
}
#formTable {
width:100%;
}
#xmlArea {
width:100%;
margin:auto;
}
.label {
font-weight:bold;
text-align:right;
padding:10px;
}
.centerLabel{
font-weight:bold;
text-align:center;
padding:10px;
}
h1 {
font-size:30px;
text-align:center;
margin-bottom:15px;
text-shadow: rgb(255, 255, 255) 1px 1px 0px;
}
PK -a:} } dashboard.html
Dashboard
PK a:u u
manifest.json{
"format_version": 1,
"id": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2",
"version": "0.2",
"name": "CustomNewTab",
"description": "Customize your new tab page.",
"toolstrips": [
"CustomNewTab_toolstrip.html"
],
"content_scripts": [
{
"js": ["CustomNewTab.js"],
"matches": ["chrome://newtab/*"],
"run_at": "document_start"
}
]
}PK 1O:
ui/background.pngPNG
IHDR :T sRGB gAMA a cHRM z&