Patch Launcher Add or Delete Pages

From WebOS Internals
Revision as of 03:30, 20 July 2009 by Freakout (talk | contribs) (Pasting in the old wiki source, unedited)
Jump to navigation Jump to search

Add/Delete Pages in the Launcher

module Redirect destination=""

<!DOCTYPE html

    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="" xml:lang="en" lang="en">


	<title>pre dev wiki: Add / Delete Pages in the Launcher</title>
		 	<script type="text/javascript" src=""></script>
	<script  type="text/javascript">
		var URL_HOST = '';

var URL_DOMAIN = '';

		// global request information
		var WIKIREQUEST = {}; = {}; = ""; = 113910; = 629503; = 2437; = "add-delete-pages-in-the-launcher";
		OZONE.request.timestamp = 1248056362; = new Date(); = 'en'; = "add-delete-pages-in-the-launcher"; = 3543419; = "en";
		OZONE.lang = "en";

// window.onload = WikidotInit();

	<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
        	<meta http-equiv="content-language" content="en"/>
		<script type="text/javascript" src=""></script>

<style type="text/css"> body {

 background-position: center 24px;

} </style> <style type="text/css" id="internal-style">

@import url(;

  		   			@import url(;
  		   			@import url(;
   <link rel="shortcut icon" href="/local--favicon/favicon.gif"/>
   <link rel="icon" type="image/gif" href="/local--favicon/favicon.gif"/>
           <link rel="alternate" type="application/wiki" title="Edit this page!" href=""/>


 <body id="html-body">

<script type="text/javascript">

   var uri = window.location.href;
   var title = document.title
   $j('#navi-bar .share a').each(function(){
     $t = $j(this);
     var u = $t.attr('href');
     u = u.replace(/TITLE/, encodeURIComponent(title)).replace(/URI/, encodeURIComponent(uri));
     $t.attr('href', u);
   $j('#navi-bar .share .facebook').click(function(e){''+encodeURIComponent(uri)+'&t='+encodeURIComponent(title),'sharer','toolbar=0,status=0,width=626,height=436');
   $j('#navi-bar .share .delicious').click(function(e){''+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550');

$j('#navi-bar .new-site form').submit(function(e){ e.preventDefault(); var $i = $j('#navi-bar .new-site form input.text'); if($i.hasClass('empty')){ var w = new OZONE.dialogs.ErrorDialog();

 			w.content = "You need to enter a valid web address for your new wiki.";;
   var siteName = $i.attr('value');
   siteName = siteName.replace(/^\s+/, ).replace(/\s+$/,);

// validate a bit if(siteName.length <3){ var w = new OZONE.dialogs.ErrorDialog(); w.content = "You need to provide the web address for you wiki and it should be at least 3 characters long.";; return; } var p = {}; p.action = 'wiki/special/NewWikiWidgetAction'; p.event = 'newWiki'; p.siteName = siteName; OZONE.ajax.requestModule(null, p, function(r){ if(!WIKIDOT.utils.handleError(r)) {return;}

 		// seems fine.

}); }); $j('#navi-bar .new-site form input.text').focus(function(){ var $t = $j(this); if($t.hasClass('empty')){ $t.removeClass('empty'); $t.attr('value', ); } });


Add / Delete Pages in the Launcher

This is a quick tutorial on how to add or delete pages in the Launcher.

Someone in the forum talked about being able to add and delete pages in the Launcher app and I thought I would look into it further. They stated that they were able to add new pages and delete existing pages.

Upon further investigation, they were correct. There is existing code in a particular js file that has been commented out that will allow you to create a new page and delete the current page you are on in the Launcher. There is a variable that stores the max number of pages to 10. This value can probably be increased, but I don't recommend it and seriously, who would need more that 10 pages anyway, right?

After I uncommented these said lines and rebooted, I was able to perform these functions. So I tested the new page function.

The new page and delete page functions will appear in the launcher app menu.

Creating/adding a page:

This will create a new page and move whatever page you were on to the right. There is nothing special to this page besides the fact that you now have a new page. I was able to drag icons to it just like any other page. To test this new page out I added a contact to that page.

Deleting/Removing a page:

The code is already set up to automagically move any icons to the page to the left of the page you are deleting. What I mean is if the page you delete is in the middle of other pages it will toss whatever was on your current page to the page to the left of it.

When I deleted a page that was to the left of the apps page that had web app defaulted to it, it tossed the icons to that page because there is no page to the left of the one I just deleted.

Creating/adding multiple pages:

So I was on page 1 and created a new page. Then I moved over to the page where device info, backup, screen & lock was at and created a new page there. It tossed the page to the right and made a new page.

Uncomment the Following


Look for "appMenuModel" (line 27) a few lines below you will see a line that has "newpage" in it.
On the line that remove the "/*" and on the line that has "deletepage" remove the "*/"

Next look further in the file (line 119) for "switch" again remove the "/* and "*/" that surrounds the cases for newpage and deletepage.

reboot and now you'll have new page and delete page in the launcher app menu.

Note that you can download a patch for this at <a href=""></a>

<img src="" alt="unknown20091306141631.png" class="image" />

-PS I moved the location of the edit menu down…


The credit to this goes to someone in the forums, at the time this was written I wasn't able to find out who exactly was it who wrote about it first (purely I don't have the time to look.) Pyrognome tested and confirmed the new page and delete page functionality.

page tags: <a href="/system:page-tags/tag/hidden-functionality#pages">hidden-functionality</a> <a href="/system:page-tags/tag/launcher#pages">launcher</a> <a href="/system:page-tags/tag/luna#pages">luna</a>

<a href="/system:page-tags/tag/tweak#pages">tweak</a> <a href="/system:page-tags/tag/ui#pages">ui</a> <a href="/system:page-tags/tag/webos#pages">webos</a>

page_revision: 5, last_edited: 1245847491|%e %b %Y, %H:%M %Z (%O ago)

<a href="javascript:;" id="edit-button">edit</a><a href="javascript:;" id="tags-button">tags</a> <a href="javascript:;" id="history-button">history</a> <a href="javascript:;" id="files-button">files</a> <a href="javascript:;" id="print-button">print</a> <a href="javascript:;" id="site-tools-button">site tools</a><a href="javascript:;" id="more-options-button">+ options</a>

Unless stated otherwise Content of this page is licensed under <a rel="license" href="">Creative Commons Attribution-ShareAlike 3.0 License</a>

<script src="" type="text/javascript"></script>

<script type="text/javascript"> _uacct = "UA-9343099-1";

urchinTracker(); </script>

<script src="" type="text/javascript"></script> <script type="text/javascript"> _uff = false; _uacct = "UA-68540-5"; _udn=""; urchinTracker(); </script>

<script type="text/javascript"> _qoptions={ qacct:"p-edL3gsnUjJzw-" }; </script> <script type="text/javascript" src=""></script> <noscript> <img src="" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/> </noscript>