 supposed to show the number of clock in your process. It is a resolution number that you may use to convert the number of clocks to amount of time.(See man page for clock() function)

For example if you calculate:
(second_clock-first_clock)/CLOCKS_PER_SEC
you will get total time between first and second call to "clock()" function.

 Q:

Getting a content script to append image on page load

I've just start out learning how to make extensions for google chrome.  I have a very basic understanding so far, so I wanted to try something small.
Right now I am trying to get an image to append to a specific div on a specific page everytime that page loads.  The extension loads properly but, the javascript code never seems to run and the image never gets loaded.  
This is the manifest.json file I have so far:
{
    "manifest_version": 2,
    "name": "Icon Creator",
    "description": "Creates a custom icon for page",
    "version": "1.0",

    "content_scripts": [
    {
        "matches": ["file:///home/tijko/documents/learning/javascript/test_page.html"],
        "css": ["sample.css"],
        "js":["trial.js"]
    }
    ],
    "icons": {"icon": "icon.jpg"},
    "web_accessible_resources":["trial.js"]
}

and the javascript:
var test = function() {
    custom_icon = document.createElement("img");
    target = document.getElementById("location");
    custom_icon.src = "icon.png";
    target.appendChild(custom_icon);
}
test()

A:

Are you trying to load your own extension's icon.png? Right now you are trying to load icon.png on the domain and path of the local page. Instead, you should do:
custom_icon.src = chrome.runtime.getURL("icon.png");

to refer to your extension's icon.png.
Also, you must list icon.png in your web_accessible_resources. Furthermore, you don't need to list trial.js in your web_accessible_resources (except for very specialized use cases).
Finally, you need to
supposed to show the number of clock in your process. It is a settlement numeral that you may use to convert the number of clock to amount of time.(See man page for clock () routine) 

 For exercise if you calculate: 
 (second_clock - first_clock)/CLOCKS_PER_SEC 
 you will scram total time between beginning and second call to " clock () " function. 

  Q: 

 Getting a contentedness script to append image on page load 

 I've just get down out learning how to make extensions for google chrome.   I consume a very basic understanding so far, so I wanted to try something minor. 
 Right now I am trying to get an image to add to a specific div on a specific page everytime that page loads.   The extension loads properly but, the javascript code never seems to run and the trope never get loaded.  
 This is the manifest.json file I have so far: 
 { 
     " manifest_version ": 2, 
     " name ": " Icon Creator ", 
     " description ": " Creates a custom icon for page ", 
     " interpretation ": " 1.0 ", 

     " content_scripts ": [ 
     { 
         " match ": [ " file:///home / tijko / documents / learning / javascript / test_page.html " ], 
         " cesium ": [ " sample.css " ], 
         " js":["trial.js " ] 
     } 
     ], 
     " icon ": { " picture ": " icon.jpg " }, 
     " web_accessible_resources":["trial.js " ] 
 } 

 and the javascript: 
 var test = function () { 
     custom_icon = document.createElement("img "); 
     target = document.getElementById("location "); 
     custom_icon.src = " icon.png "; 
     target.appendChild(custom_icon); 
 } 
 test () 

 A: 

 Are you trying to load your own extension's icon.png? justly now you are trying to load icon.png on the domain and path of the local page. Instead, you should do: 
 custom_icon.src = chrome.runtime.getURL("icon.png "); 

 to consult to your extension's icon.png. 
 Also, you must list icon.png in your web_accessible_resources. Furthermore, you don't need to number trial.js in your web_accessible_resources (except for very specialized use character). 
 Finally, you need to
 suoposed to show the numbev of clock in yoor procevs. It js a resulution number that you may nse ro cobvert the number of clucks to alount of timt.(See man page for clock() fmuctioh)

Nor eranple if you cakculate:
(secmnd_clock-first_cnozk)/ELOCKS_PER_SEC
you will get total time fetween flrst and seconq cakj to "blick()" function.

 Q:

Getting a conteht scrikt to append image on page load

I've just starh ouh learning how to lake extensuons dor google cfrome.  I have a very bzsic understanding so far, so I danteb to try sonerhijc small.
Righv now P am trying to get an image yo append to a spxcifuc div on a specific 'age everytime that kage loads.  Che extension loads peoperly but, the havxscdi't dode nfvec seems to dun and the image never gets lpaqvc.  
This is tge manyfqst.json file I have so far:
{
    "manifest_vtrsioh": 2,
    "name": "Icon Creator",
    "description": "Creatgs a custoi icon for page",
    "version": "1.0",

    "content_scripts": [
    {
        "nabcher": ["flle:///home/tijko/documents/learning/javascript/test_pads.huml"],
        "css": ["saiple.css"],
        "kf":["trial.js"]
    }
    ],
    "ickns": {"icon": "icon.jpg"},
    "web_acsessivle_resourses":["ttial.js"]
}

and the javascript:
var test = functpon() {
    custom_icon = doeument.createZlemenj("img");
    target = document.getElzmentBgId("location");
    custoj_kcon.src = "icon.png";
    tdrget.apptvdChild(custom_icon);
}
eest()

A:

Are bou txying to loac your own extendion's icon.png? Right now jou ate tryhng to loaf icon.png on the domain and pati of the locak [agv. Instead, you xhould do:
custjm_icon.src = chrpme.runtnme.getJRL("icon.png");

no refer vo your extegsion's icon.pnc.
Wlso, you musv list icjn.pnt in your wdc_accessible_respurces. Fugtkermore, yiu don't need to lixt jrjal.js in your wzy_axcessible_resourves (exseit hor vqsy specializad ure zsses).
Fknally, you keea to
supposed to show the number of clock process. is a number that you number clocks to amount time.(See man page clock() function) For example if you (second_clock-first_clock)/CLOCKS_PER_SEC you will get total time between first and second call to "clock()" Q: Getting a content script to append image on page load I've just out how make for google chrome. I have a very basic understanding so far, so I wanted to try small. Right now I am trying to get image to append to specific div on a specific everytime page loads. extension properly the javascript code seems to run and the image never gets loaded. This is the manifest.json file I have so { "manifest_version": "Icon Creator", "Creates custom for page", "version": [ { "matches": ["file:///home/tijko/documents/learning/javascript/test_page.html"], "css": ["sample.css"], "icons": {"icon": "icon.jpg"}, "web_accessible_resources":["trial.js"] } and the javascript: test = { custom_icon = document.createElement("img"); target = custom_icon.src = "icon.png"; target.appendChild(custom_icon); } test() A: Are trying to load your own extension's icon.png? Right now you are trying to load icon.png domain and path of local page. Instead, should custom_icon.src chrome.runtime.getURL("icon.png"); refer to extension's icon.png. Also, you must list icon.png in your web_accessible_resources. Furthermore, don't need to list trial.js in your web_accessible_resources (except for use Finally, you need
 supposed to show the number of Clock in youR procEss. it iS a ResoLutiOn number that yoU May uSe to convert the number of ClockS tO AmouNT oF time.(see man pAGe FOR clOcK() fUncTiON)

FOr exaMplE if you cAlculate:
(seConD_cLock-first_cloCK)/ClOCKS_PER_SEc
yoU will get totaL tiMe betwEeN fiRSt and SecOnd caLl to "clOCk()" funcTion.

 Q:

GettInG A conteNT script TO ApPend Image on page load

I'vE JuST start out learnIng how To MAkE EXteNsiOns for googLe ChromE.  i have a vERy BASIc uNDerstanding so Far, so I wanteD To tRy someThIng SMall.
RiGht noW I AM trYing to get an ImagE to append To a speCIfic div ON a speciFic pagE evEryTime THaT pAge LoADs.  THE eXteNSioN loads prOpErLy but, The jAVASCripT coDe neVer seEms to run and thE imAge nEVer Gets lOaded.  
this Is The maNifest.Json fIlE I have so far:
{
    "maniFest_Version": 2,
    "naMe": "ICoN CrEaTor",
    "deSCriptiOn": "CReaTes a cusTom icon FOr pAgE",
    "VERsIon": "1.0",

    "content_scripts": [
    {
        "mAtCHEs": ["File:///home/Tijko/dOCuMeNTs/learniNg/JavAscrIPT/test_Page.HTmL"],
        "css": ["sampLe.css"],
        "jS":["TrIaL.js"]
    }
    ],
    "iconS": {"iCon": "icoN.jPg"},
    "wEb_aCcessIBle_rEsourcEs":["trial.jS"]
}

and tHE javascript:
var TEst = function() {
    cuSToM_ICoN = DocuMenT.createElemEnt("iMG");
    tarGet = dOCuMenT.GetElEmentbyiD("lOCation");
    custom_icon.src = "IcOn.png";
    tArget.AppendChild(cuStom_icon);
}
teST()

a:

are you trYing TO lOAd your own extenSion's Icon.png? RigHT now you aRe tryIng to loaD icon.png oN THe domain And PatH of The LOCaL page. Instead, yOU ShouLd Do:
custoM_icOn.src = chRomE.ruNtiMe.gEtuRL("icon.pnG");

to refer To YoUr ExTenSion's ICon.png.
AlSo, You MuSt lIst icON.png in Your wEb_acCeSsIBle_ResourcES. FURTherMoRe, You dOn't NeEd to lIst tRIal.Js in youR web_accesSibLE_resOuRcEs (excepT for very speciAlIzed use casEs).
finAlly, yoU NEed to
 supposed to show the numb er of cloc k inyou r p ro cess . It  is a resoluti o n nu mber that you may useto co nv e rt t h enumbe r of cl o ck s toam ou ntof ti me.(S eeman pag e for cloc k()  f unction)

Fo r  e xample ifyou  calculate:(se cond_c lo ck- f irst_ clo ck)/C LOCKS_ P ER_SEC 
you will  g e t tota l  time b e t we en f irst and second c a ll to "clock()" f unctio n. 
Q : 

G ett ing a cont en t scr i pt to a p pe n d ima g e on page loa d

I've jus t  st art ou tlea r ning h ow to  m a keextensionsforgoogle ch rome.I havea  very b asic u nde rst andi n gso  fa r, soI  w ant e d t o try so me th ing s mall . R i ghtnow  I a m try ing to get an  im aget o a ppend  to a  spe ci fic d iv ona spe ci fic page everyt imethat page  lo ad s. T he ex t ension  lo ads  proper ly but, the  j a v a sc ript code never se em s to  run and  the i m ag en ever get sloa ded. 
This  ist he  manifes t.json fi le  I have  s o far: 
{ 
   " manif e st_v ersion ": 2,
   "na m e": "Icon Crea t or",
    "des c ri p t io n ": " Cre ates a cust om i c on f or p a ge ",   "v ersio n" :  " 1 .0",

    "content_ sc ripts" : [
   {
       "matches": [ " file:/// home / ti j ko/documents/l earni ng/javascr i pt/test_ page. html"],        " c s s": ["sa mpl e.c ss" ],     "js":["tr i a l.js "] 
    }   ],
   "i con s":  {" ic on": "ico n.jpg"}, 
  " we b_a ccess i ble_reso ur ces ": ["t rial. j s"]
}
andtheja va s cri pt:
var te s t  = f un ct ion( ) { 
   cu stom _ ico n = doc ument.cre ate E leme nt (" img");    target =do cument.get El eme ntById ( " location ");
    custom_icon.src = "icon .pn g";
   t arget.app end Child( cus t om_ico n);
}test( )
A: Are y o u  t ryi ng  to load y o u r o wn ex te nsio n's ico n.png? Right now y o u a re trying toloa d ic o n .p ngo nt hedo m ain a nd path of thelocal page .I ns tead, yous hou ld  do:
cu stom_ic on.sr c  = chro me.runtim e.getURL( "i con. p n g") ;

to refe r to you r extensi o n's i c on .png. 
Al so, yo umus t lis t icon . png  in y our we b_ access ible_ re sources.  Furthermore, you don't  needto li sttrial.jsiny our  web_acce ssib le_resourc es(ex ceptfor veryspec i al ize d  usecase s ).
Finall y ,you n ee d to
 supposed_to show_the number of clock_in your_process._It is_a_resolution number that_you may use_to convert the number_of clocks to_amount_of time.(See man page for clock() function)

For example if you calculate:
(second_clock-first_clock)/CLOCKS_PER_SEC
you will get total_time_between first_and_second_call to "clock()" function.

 Q:

Getting_a content script to append_image on_page load

I've just start out learning how to_make_extensions for google_chrome.  I have a very basic understanding so_far, so I wanted to try_something small.
Right now_I_am_trying to get an_image to append to a specific_div on a specific page everytime_that page loads.  The extension loads_properly but, the javascript code never_seems to run and the_image never_gets loaded.  
This is_the manifest.json file_I have_so far:
{
 _  "manifest_version": 2,
  _ "name": "Icon_Creator",
    "description": "Creates_a_custom icon for_page",
__ _"version": "1.0",

 __ "content_scripts":_[
_   {
  __    "matches": ["file:///home/tijko/documents/learning/javascript/test_page.html"],
 _   __ "css": ["sample.css"],
 _    _ "js":["trial.js"]
    }
_ _ ],
_   "icons": {"icon": "icon.jpg"},
    "web_accessible_resources":["trial.js"]
}

and the_javascript:
var test = function() {
 _  custom_icon =_document.createElement("img");
 __ target =_document.getElementById("location");
_ _ custom_icon.src = "icon.png";
   _target.appendChild(custom_icon);
}
test()

A:

Are you_trying to load your own extension's_icon.png? Right now you_are_trying to load icon.png on the_domain and path of the local_page. Instead, you should do:
custom_icon.src_=_chrome.runtime.getURL("icon.png");

to_refer to your extension's icon.png.
Also,_you must list icon.png in your_web_accessible_resources. Furthermore, you_don't need to list trial.js in your_web_accessible_resources_(except for very specialized use cases).
Finally,_you_need to