ChromeOS panel Javascript

////////function remove in case of error of first remove :S
function remove()
  for (i in panelIds) {


/////function remove standard///////////////////////////////
function RemoveOldPanels()
    for (i in panelIds) {
       // panelById(panelIds[i]).remove()
       p = panelById(panelIds[i]);
       if (typeof p === "undefined") {
       print("E: Couldn't find first panel");
       remove() //load the remove function in case of problems
        else 	{

RemoveOldPanels() //load the function 

//start another function to create panels layout
function chromeos(){

var panel = new Panel
if (panelIds.length == 1) {
    // we are the only panel, so set the location for the user panel.location = 'bottom'
    panel.location = 'bottom'

panel.height = 25

pager = panel.addWidget("pager");
pager.writeGlobalConfig("rows", "1");

    launcher = panel.addWidget("simplelauncher");
    launcher.writeConfig("format", "Description");
    launcher.writeConfig("showMenuTitles", "true");
    launcher.writeConfig("views", "Applications,Favorites,Computer,Settings,RunCommand,Leave");
    launcher.writeConfig("icon", "start-here");



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: