<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TheRaven</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=TheRaven"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/TheRaven"/>
	<updated>2026-04-17T13:21:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Browser_Delete_Individual_History_Items&amp;diff=3783</id>
		<title>Patch Browser Delete Individual History Items</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Browser_Delete_Individual_History_Items&amp;diff=3783"/>
		<updated>2009-08-04T21:15:34Z</updated>

		<summary type="html">&lt;p&gt;TheRaven: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This will enable swipe-deletion of individual history items from the Browser history list.&lt;br /&gt;
&lt;br /&gt;
Note: I haven't created a &amp;quot;patch&amp;quot; yet. Only manual editing instructions on this page currently. Feel free to create a patch if you can -- I'm having trouble doing the usual ssh/sftp, accessing gitorious, etc. from behind this proxy, so I'm doing this all the old-fashioned way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Editing Instructions==&lt;br /&gt;
Note: When I first attempted these changes, I edited the code in the files where you'd expect them to be (controllers/history-assistant.js, models/history-store.js), and found that no functionality changed. I grepped around and found that all the code from those two files (and many others is duplicated in controllers/global_code.js, and that only after I changed *that* file did it work. I don't know why, but oh well... So you'll only have to modify one file to get this working.&lt;br /&gt;
&lt;br /&gt;
First, backup the file we're going to edit.&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;cd /usr/palm/applications/com.palm.app.browser/app/controllers&lt;br /&gt;
cp global_code.js global_code.js.bkp&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, open global_code.js file for editing.&lt;br /&gt;
&lt;br /&gt;
First, we add the ability to swipe-delete to the historyList control itself:&lt;br /&gt;
Find (on line 1101)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;		this.controller.setupWidget('historyList', {&lt;br /&gt;
			itemTemplate:'history/history-entry',&lt;br /&gt;
			listTemplate:'history/history-container',&lt;br /&gt;
			itemsCallback:this._itemsCallback.bind(this)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a comma to the end of the last parameter line, and then add the swipeToDelete and autoconfirmDelete parameters, so it looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;		this.controller.setupWidget('historyList', {&lt;br /&gt;
			itemTemplate:'history/history-entry',&lt;br /&gt;
			listTemplate:'history/history-container',&lt;br /&gt;
			itemsCallback:this._itemsCallback.bind(this),&lt;br /&gt;
			swipeToDelete:true,&lt;br /&gt;
			autoconfirmDelete:true&lt;br /&gt;
		});&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want history item deletes to have the Delete/Cancel confirmation, change autoconfirmDelete to false. But with autoconfirmDelete:true, you can delete multiple pages quickly.&lt;br /&gt;
&lt;br /&gt;
Next, we want to hook the delete event of the historyList to a handler. A few lines down, right after&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._onListSelectionHandler = this._onListSelection.bindAsEventListener(this);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Add the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._onListDeleteHandler = this._onListDelete.bindAsEventListener(this);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we need to add a listener for that event. About 20 lines down in the HistoryAssistant.prototype.activate function, right after this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._historyListWidget.addEventListener(Mojo.Event.listTap, this._onListSelectionHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._historyListWidget.addEventListener(Mojo.Event.listDelete, this._onListDeleteHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we need to add the stopListening in the deactivate function (just a few lines down).&lt;br /&gt;
Right after this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Mojo.Event.stopListening(this._historyListWidget, Mojo.Event.listTap, this._onListSelectionHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Mojo.Event.stopListening(this._historyListWidget, Mojo.Event.listDelete, this._onListDeleteHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add the handler itself. About 80 lines down, right after the HistoryAssistant.prototype._onListSelection function (though it doesn't *really* matter where you put it.. I'm just putting like things together), add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;HistoryAssistant.prototype._onListDelete = function(event) {&lt;br /&gt;
	this.historyStore.deleteHistoryEntry(event.item.url, function() {}, function() {});&lt;br /&gt;
};&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ok! The event is all hooked up to the handler, and the list is swipeable. Now we just need to add code to the history-store model to delete the actual item from the database.&lt;br /&gt;
&lt;br /&gt;
Look for this function, on about line 7350:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;function HistoryStore(options, onSuccess, onFailure) {&lt;br /&gt;
	try {&lt;br /&gt;
		this.displayName = options.displayName || this.name;&lt;br /&gt;
		this.estimatedSize = options.estimatedSize;&lt;br /&gt;
		this.database = options.database;&lt;br /&gt;
		this.database.transaction(this._createTable.bind(this, onSuccess, onFailure));&lt;br /&gt;
	} catch (e) {&lt;br /&gt;
		Mojo.Log.logException(e, 'HistoryStore()');&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;HistoryStore.prototype._deleteHistoryEntry = function(url, onSuccess, onFailure, transaction) {&lt;br /&gt;
	this._executeSql(transaction, onSuccess, onFailure,&lt;br /&gt;
		&amp;quot;DELETE FROM 'history' WHERE url = ?&amp;quot;, [url] );&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
HistoryStore.prototype.deleteHistoryEntry = function(url, onSuccess, onFailure) {&lt;br /&gt;
        this.database.transaction(this._deleteHistoryEntry.bind(this, url, onSuccess, onFailure));&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: because of the simplicity of the SQL statement (basically &amp;quot;delete all history items with this url&amp;quot;), one swipe could delete multiple history items. For example, if you swipe an item with the url http://forums.precentral.net/faq.php, and you have more than one of them in your history, they will all be deleted. This may or may not be what you want.&lt;br /&gt;
&lt;br /&gt;
That's all.. reboot your pre and give it a try!&lt;/div&gt;</summary>
		<author><name>TheRaven</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Browser_Delete_Individual_History_Items&amp;diff=3782</id>
		<title>Patch Browser Delete Individual History Items</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Browser_Delete_Individual_History_Items&amp;diff=3782"/>
		<updated>2009-08-04T21:02:56Z</updated>

		<summary type="html">&lt;p&gt;TheRaven: added section headers&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
== Introduction ==&lt;br /&gt;
This will enable swipe-deletion of individual history items from the Browser history list.&lt;br /&gt;
&lt;br /&gt;
Note: I haven't created a &amp;quot;patch&amp;quot; yet. Only manual editing instructions on this page currently. Feel free to create a patch if you can -- I'm having trouble doing the usual ssh/sftp, accessing gitorious, etc. from behind this proxy, so I'm doing this all the old-fashioned way.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Editing Instructions==&lt;br /&gt;
Note: When I first attempted these changes, I edited the code in the files where you'd expect them to be (controllers/history-assistant.js, models/history-store.js), and found that no functionality changed. I grepped around and found that all the code from those two files (and many others is duplicated in controllers/global_code.js, and that only after I changed *that* file did it work. I don't know why, but oh well... So you'll only have to modify one file to get this working.&lt;br /&gt;
&lt;br /&gt;
Open&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/usr/palm/applications/com.palm.app.browser/app/controllers/global_code.js&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we add the ability to swipe-delete to the historyList control itself:&lt;br /&gt;
Find (on line 1101)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;		this.controller.setupWidget('historyList', {&lt;br /&gt;
			itemTemplate:'history/history-entry',&lt;br /&gt;
			listTemplate:'history/history-container',&lt;br /&gt;
			itemsCallback:this._itemsCallback.bind(this)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a comma to the end of the last parameter line, and then add the swipeToDelete and autoconfirmDelete parameters, so it looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;		this.controller.setupWidget('historyList', {&lt;br /&gt;
			itemTemplate:'history/history-entry',&lt;br /&gt;
			listTemplate:'history/history-container',&lt;br /&gt;
			itemsCallback:this._itemsCallback.bind(this),&lt;br /&gt;
			swipeToDelete:true,&lt;br /&gt;
			autoconfirmDelete:true&lt;br /&gt;
		});&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want history item deletes to have the Delete/Cancel confirmation, change autoconfirmDelete to false. But with autoconfirmDelete:true, you can delete multiple pages quickly.&lt;br /&gt;
&lt;br /&gt;
Next, we want to hook the delete event of the historyList to a handler. A few lines down, right after&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._onListSelectionHandler = this._onListSelection.bindAsEventListener(this);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Add the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._onListDeleteHandler = this._onListDelete.bindAsEventListener(this);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we need to add a listener for that event. About 20 lines down in the HistoryAssistant.prototype.activate function, right after this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._historyListWidget.addEventListener(Mojo.Event.listTap, this._onListSelectionHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._historyListWidget.addEventListener(Mojo.Event.listDelete, this._onListDeleteHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we need to add the stopListening in the deactivate function (just a few lines down).&lt;br /&gt;
Right after this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Mojo.Event.stopListening(this._historyListWidget, Mojo.Event.listTap, this._onListSelectionHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Mojo.Event.stopListening(this._historyListWidget, Mojo.Event.listDelete, this._onListDeleteHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add the handler itself. About 80 lines down, right after the HistoryAssistant.prototype._onListSelection function (though it doesn't *really* matter where you put it.. I'm just putting like things together), add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;HistoryAssistant.prototype._onListDelete = function(event) {&lt;br /&gt;
	this.historyStore.deleteHistoryEntry(event.item.url, function() {}, function() {});&lt;br /&gt;
};&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ok! The event is all hooked up to the handler, and the list is swipeable. Now we just need to add code to the history-store model to delete the actual item from the database.&lt;br /&gt;
&lt;br /&gt;
Look for this function, on about line 7350:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;function HistoryStore(options, onSuccess, onFailure) {&lt;br /&gt;
	try {&lt;br /&gt;
		this.displayName = options.displayName || this.name;&lt;br /&gt;
		this.estimatedSize = options.estimatedSize;&lt;br /&gt;
		this.database = options.database;&lt;br /&gt;
		this.database.transaction(this._createTable.bind(this, onSuccess, onFailure));&lt;br /&gt;
	} catch (e) {&lt;br /&gt;
		Mojo.Log.logException(e, 'HistoryStore()');&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;HistoryStore.prototype._deleteHistoryEntry = function(url, onSuccess, onFailure, transaction) {&lt;br /&gt;
	this._executeSql(transaction, onSuccess, onFailure,&lt;br /&gt;
		&amp;quot;DELETE FROM 'history' WHERE url = ?&amp;quot;, [url] );&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
HistoryStore.prototype.deleteHistoryEntry = function(url, onSuccess, onFailure) {&lt;br /&gt;
        this.database.transaction(this._deleteHistoryEntry.bind(this, url, onSuccess, onFailure));&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: because of the simplicity of the SQL statement (basically &amp;quot;delete all history items with this url&amp;quot;), one swipe could delete multiple history items. For example, if you swipe an item with the url http://forums.precentral.net/faq.php, and you have more than one of them in your history, they will all be deleted. This may or may not be what you want.&lt;br /&gt;
&lt;br /&gt;
That's all.. reboot your pre and give it a try!&lt;/div&gt;</summary>
		<author><name>TheRaven</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Patch_Browser_Delete_Individual_History_Items&amp;diff=3781</id>
		<title>Patch Browser Delete Individual History Items</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Patch_Browser_Delete_Individual_History_Items&amp;diff=3781"/>
		<updated>2009-08-04T20:59:50Z</updated>

		<summary type="html">&lt;p&gt;TheRaven: new page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{template:patch}}&lt;br /&gt;
This will enable swipe-deletion of individual history items from the Browser history list.&lt;br /&gt;
&lt;br /&gt;
Note: I haven't created a &amp;quot;patch&amp;quot; yet. Only manual editing instructions on this page currently. Feel free to create a patch if you can -- I'm having trouble doing the usual ssh/sftp, accessing gitorious, etc. from behind this proxy, so I'm doing this all the old-fashioned way.&lt;br /&gt;
&lt;br /&gt;
Note: When I first attempted these changes, I edited the code in the files where you'd expect them to be (controllers/history-assistant.js, models/history-store.js), and found that no functionality changed. I grepped around and found that all the code from those two files (and many others is duplicated in controllers/global_code.js, and that only after I changed *that* file did it work. I don't know why, but oh well... So you'll only have to modify one file to get this working.&lt;br /&gt;
&lt;br /&gt;
Open&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;/usr/palm/applications/com.palm.app.browser/app/controllers/global_code.js&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First, we add the ability to swipe-delete to the historyList control itself:&lt;br /&gt;
Find (on line 1101)&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;		this.controller.setupWidget('historyList', {&lt;br /&gt;
			itemTemplate:'history/history-entry',&lt;br /&gt;
			listTemplate:'history/history-container',&lt;br /&gt;
			itemsCallback:this._itemsCallback.bind(this)&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add a comma to the end of the last parameter line, and then add the swipeToDelete and autoconfirmDelete parameters, so it looks like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;		this.controller.setupWidget('historyList', {&lt;br /&gt;
			itemTemplate:'history/history-entry',&lt;br /&gt;
			listTemplate:'history/history-container',&lt;br /&gt;
			itemsCallback:this._itemsCallback.bind(this),&lt;br /&gt;
			swipeToDelete:true,&lt;br /&gt;
			autoconfirmDelete:true&lt;br /&gt;
		});&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: if you want history item deletes to have the Delete/Cancel confirmation, change autoconfirmDelete to false. But with autoconfirmDelete:true, you can delete multiple pages quickly.&lt;br /&gt;
&lt;br /&gt;
Next, we want to hook the delete event of the historyList to a handler. A few lines down, right after&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._onListSelectionHandler = this._onListSelection.bindAsEventListener(this);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Add the following line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._onListDeleteHandler = this._onListDelete.bindAsEventListener(this);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we need to add a listener for that event. About 20 lines down in the HistoryAssistant.prototype.activate function, right after this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._historyListWidget.addEventListener(Mojo.Event.listTap, this._onListSelectionHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;this._historyListWidget.addEventListener(Mojo.Event.listDelete, this._onListDeleteHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we need to add the stopListening in the deactivate function (just a few lines down).&lt;br /&gt;
Right after this line:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Mojo.Event.stopListening(this._historyListWidget, Mojo.Event.listTap, this._onListSelectionHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;Mojo.Event.stopListening(this._historyListWidget, Mojo.Event.listDelete, this._onListDeleteHandler);&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we add the handler itself. About 80 lines down, right after the HistoryAssistant.prototype._onListSelection function (though it doesn't *really* matter where you put it.. I'm just putting like things together), add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;HistoryAssistant.prototype._onListDelete = function(event) {&lt;br /&gt;
	this.historyStore.deleteHistoryEntry(event.item.url, function() {}, function() {});&lt;br /&gt;
};&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ok! The event is all hooked up to the handler, and the list is swipeable. Now we just need to add code to the history-store model to delete the actual item from the database.&lt;br /&gt;
&lt;br /&gt;
Look for this function, on about line 7350:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;function HistoryStore(options, onSuccess, onFailure) {&lt;br /&gt;
	try {&lt;br /&gt;
		this.displayName = options.displayName || this.name;&lt;br /&gt;
		this.estimatedSize = options.estimatedSize;&lt;br /&gt;
		this.database = options.database;&lt;br /&gt;
		this.database.transaction(this._createTable.bind(this, onSuccess, onFailure));&lt;br /&gt;
	} catch (e) {&lt;br /&gt;
		Mojo.Log.logException(e, 'HistoryStore()');&lt;br /&gt;
	}&lt;br /&gt;
}&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that, add this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;HistoryStore.prototype._deleteHistoryEntry = function(url, onSuccess, onFailure, transaction) {&lt;br /&gt;
	this._executeSql(transaction, onSuccess, onFailure,&lt;br /&gt;
		&amp;quot;DELETE FROM 'history' WHERE url = ?&amp;quot;, [url] );&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
HistoryStore.prototype.deleteHistoryEntry = function(url, onSuccess, onFailure) {&lt;br /&gt;
        this.database.transaction(this._deleteHistoryEntry.bind(this, url, onSuccess, onFailure));&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: because of the simplicity of the SQL statement (basically &amp;quot;delete all history items with this url&amp;quot;), one swipe could delete multiple history items. For example, if you swipe an item with the url http://forums.precentral.net/faq.php, and you have more than one of them in your history, they will all be deleted. This may or may not be what you want.&lt;br /&gt;
&lt;br /&gt;
That's all.. reboot your pre and give it a try!&lt;/div&gt;</summary>
		<author><name>TheRaven</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Portal:Patches_to_webOS&amp;diff=3780</id>
		<title>Portal:Patches to webOS</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Portal:Patches_to_webOS&amp;diff=3780"/>
		<updated>2009-08-04T20:25:48Z</updated>

		<summary type="html">&lt;p&gt;TheRaven: added link to new page for Browser history patch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__notoc__&lt;br /&gt;
{{portal-header&lt;br /&gt;
|This page lists patches to webOS existing apps which modify the behavior as shipped.  '''Note''' that these patches may be version specific and may be broken by future webOS updates.  Proceed with caution. If you get one that works please move it under the correct column, alphabetically, and title the page:&lt;br /&gt;
'''&amp;quot;Patch [application] [description]&amp;quot;''' (for application specific patches) &amp;lt;br&amp;gt;&lt;br /&gt;
'''&amp;quot;Patch webOS [description]&amp;quot;''' (for patches not part of a specific application)&lt;br /&gt;
}}&lt;br /&gt;
This page is undergoing structuring please contribute moving or adding new entries under the appropriate headings. For now put pages in alphabetical order. Each page should contain at least the basic headings&lt;br /&gt;
*1. '''Introduction''': A brief description to introduce people to the patch.&lt;br /&gt;
**1.1 '''Usage''':An explanation if it is needed on how to use the modification see Add/Delete Pages in the Launcher as an example.&lt;br /&gt;
*2. '''Editing Process''': Step by step instructions to manually edit. &lt;br /&gt;
*3. '''Patching Process''': Details for making the edits with a patch file and pointing people to the [[Applying Patches]] page if the patch is also provided in the webos-internals gitorious repository.&lt;br /&gt;
&lt;br /&gt;
{{portal-three-columns&lt;br /&gt;
|column1= &lt;br /&gt;
===webOS Update Information===&lt;br /&gt;
* [[Update 1.1.0|Update 1.1]]&lt;br /&gt;
* [[Update 1.0.4|Update 1.0.4]] &lt;br /&gt;
* [[Update 1.0.3|Update 1.0.3]]&lt;br /&gt;
&lt;br /&gt;
===Patches that Need Work===&lt;br /&gt;
* [[Bugs]]&lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
===Patch Ideas to be Created or in Progress===&lt;br /&gt;
&lt;br /&gt;
* [[Add_Ability_To_Choose_Snooze_Length|Add Ability to Choose Snooze Length]]&lt;br /&gt;
* [[Changing Clipboard Data From The Shell|Changing Clipboard Data from the Shell]]&lt;br /&gt;
* [[Development_%26_Tweak_Ideas | Development &amp;amp; Tweaking Ideas]]&lt;br /&gt;
* [[Longer Vibrate|Longer Vibrate]]&lt;br /&gt;
* [[More_Calculator_Functions|Accessing additional built-in calculator functions]]&lt;br /&gt;
&lt;br /&gt;
|column3=&lt;br /&gt;
===Notes===&lt;br /&gt;
These modifications lack a patch process, please add one to the details to the page and have it added to the webOS-internals gitorious repository. Info for the repository is on [[Applying Patches]].&lt;br /&gt;
&lt;br /&gt;
*Empty&lt;br /&gt;
}}&lt;br /&gt;
{{portal-three-columns&lt;br /&gt;
|column1= &lt;br /&gt;
==Patches to webOS apps==&lt;br /&gt;
===webOS 1.1 OK===&lt;br /&gt;
&lt;br /&gt;
* [[Patch Amazon Download Music over EVDO|Amazon: Download Music over EVDO]]&lt;br /&gt;
* [[Patch Browser Global Search Addons|Browser: Global Search Addons]]&lt;br /&gt;
* [[Patch Browser Delete Individual History Items|Browser: Delete Individual History Items]]&lt;br /&gt;
* [[Patch Calendar Show All-Day Events in Month View|Calendar: Show All-Day Events in Month View]] &lt;br /&gt;
* [[Patch Camera 10 Second Countdown Timer|Camera: 10 Second Countdown Timer]]&lt;br /&gt;
* [[Patch Camera Shutter Sound On-Off Button|Camera: Shutter Sound On-Off Button]]&lt;br /&gt;
* [[Patch Camera Using Volume Buttons to Take a Picture|Camera: Using Volume Buttons to Take a Picture]]&lt;br /&gt;
* [[Patch Clock Changing Alarm Button Order and Snooze Duration|Clock: Changing Alarm Button Order and Snooze Duration]]&lt;br /&gt;
* [[Patch Clock Enabling the Hidden Theme|Clock: Enabling the Hidden Theme]]&lt;br /&gt;
* [[Patch Email Change &amp;quot;Running Late&amp;quot; Message|Email: Change &amp;quot;Running Late&amp;quot; Message]]&lt;br /&gt;
* [[Patch Email Confirm Deletion|Email: Confirm Deletion]]&lt;br /&gt;
* [[Patch Email Change Default Font for Replies-Forwards from Navy to Black|Email: Change Default Font for Replies/Forwards from Navy to Black]]&lt;br /&gt;
* [[Patch Launcher Add or Delete Pages|Launcher: Add/Delete Pages]]&lt;br /&gt;
* [[Patch Launcher Hide-Delete The NASCAR App|Launcher: Hide/Delete The NASCAR App]]&lt;br /&gt;
* [[Patch Launcher Hide Media Sync Option|Launcher: Hide Media Sync Option]]&lt;br /&gt;
* [[Patch Launcher Unhide the DeveloperMode App|Launcher: Unhide the DeveloperMode App]]&lt;br /&gt;
* [[Patch MediaPlayer Bookmarking|MediaPlayer: Bookmarking]]&lt;br /&gt;
* [[Patch Messaging Adding Timestamps to All Received Messages|Messaging: Adding Timestamps to All Received Messages]]&lt;br /&gt;
* [[Patch Messaging Change &amp;quot;Enter Key&amp;quot; To Create Newline|Messaging: Change &amp;quot;Enter Key&amp;quot; To Create Newline]]&lt;br /&gt;
* [[Patch Messaging Character Counter|Messaging: Character Counter]]&lt;br /&gt;
* [[Patch Messaging Display Full Status Messages|Messaging: Display Full Status Messages]] &lt;br /&gt;
* [[Patch Messaging Forward Messages|Messaging: Forward Messages]]&lt;br /&gt;
* [[Patch Messaging New Cards For Each Conversation|Messaging: New Cards For Each Conversation]]&lt;br /&gt;
* [[Patch Messaging Sounds|Messaging: Message Sound]]&lt;br /&gt;
* [[Patch MCraig Enabling Personals Category|mCraig: Enabling Personals Category]]&lt;br /&gt;
* [[Patch PDF Viewer Change Orientation|PDF Viewer: Change Orientation]]&lt;br /&gt;
* [[Patch Phone Disable Various Call Sounds|Phone: Disable Various Call Sounds]]&lt;br /&gt;
* [[Patch Phone Edit Dialer Theme|Phone: Edit Dialer Theme]]&lt;br /&gt;
* [[Patch Phone Editing the Lock Screen|Phone: Editing the Lock Screen]]&lt;br /&gt;
* [[Patch Phone Show Call Duration in the Call Log|Phone: Show Call Duration in the Call Log]]&lt;br /&gt;
* [[Patch Tasks Always Show Details of New Tasks|Tasks: Always Show Details of New Tasks]]&lt;br /&gt;
&lt;br /&gt;
===Fixed in 1.1 - No longer needed===&lt;br /&gt;
* [[Patch Email Fix Broken Formatting|Email: Fix Broken Formatting for E-mails]]&lt;br /&gt;
&lt;br /&gt;
===Not 1.1 compatible===&lt;br /&gt;
* [[Patch Camera Remote View|Camera: Remote View]]&lt;br /&gt;
* [[Patch Browser Downloading Files|Browser: Downloading Files]] &lt;br /&gt;
* [[Patch Email Enable Landscape Viewing|Email: Enable Landscape Viewing]] &lt;br /&gt;
* [[Patch Email Fix Attachments|Email: Fix Attachments]]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
|column2=&lt;br /&gt;
==Patches not part of a specific app==&lt;br /&gt;
===webOS 1.1 OK===&lt;br /&gt;
* [[Patch webOS Boot Themes|Boot Themes]]&lt;br /&gt;
* [[Patch webOS Brightness|Brightness]]&lt;br /&gt;
* [[Patch webOS Bypassing Activation|Bypassing Activation]]&lt;br /&gt;
* [[Patch webOS Change Carrier String|Change Carrier String]]&lt;br /&gt;
* [[Patch webOS Changing the &amp;quot;Turn off after X&amp;quot; time|Changing the &amp;quot;Turn off after X&amp;quot; Time]]&lt;br /&gt;
* [[Patch webOS CPU Frequency or Voltage Scaling|CPU Frequency or Voltage Scaling]]&lt;br /&gt;
* [[Patch webOS Disable Charging Event Sounds|Disable Charging Event Sounds]]&lt;br /&gt;
* [[Patch webOS GPS Tracking|GPS Tracking]]&lt;br /&gt;
* [[Patch webOS Graphics|Graphics]]&lt;br /&gt;
* [[Patch webOS Keep Phone Awake While in Remote Session|Keep Phone Awake While in Remote Session]]&lt;br /&gt;
* [[Patch webOS Logging Information from Within Scripts|Logging Information from Within Scripts]]&lt;br /&gt;
* [[Patch webOS Modifying a Stock App While Keeping the Original|Modifying a Stock App While Keeping the Original]] &lt;br /&gt;
* [[Patch webOS Add Words to AutoCorrect Dictionary|Modify AutoCorrect Dictionary]]&lt;br /&gt;
* [[Patch webOS Radio Power Switch|Radio Power Switch]]&lt;br /&gt;
* [[Patch webOS Random Wallpaper Switching|Random Wallpaper Switching]]&lt;br /&gt;
* [[Patch webOS Reverse Tunnel|Reverse Tunnel]] &lt;br /&gt;
* [[Patch webOS Roam Control|Roam Control]]&lt;br /&gt;
* [[Patch webOS Show Actual Battery Percentage | Show Actual Battery Percentage]]&lt;br /&gt;
&lt;br /&gt;
===Fixed in 1.1 - No longer needed===&lt;br /&gt;
* Empty&lt;br /&gt;
&lt;br /&gt;
===Not 1.1 compatible===&lt;br /&gt;
* [[Patch webOS Email App Patch to Prompt for IPK Installation|Email App Patch to Prompt for IPK Installation]] &lt;br /&gt;
&lt;br /&gt;
|column3=&lt;br /&gt;
==== The following have not been checked for compatibility with webOS 1.1. ====&lt;br /&gt;
&lt;br /&gt;
* [[Browser_Plugins|Browser Plugins]]&lt;br /&gt;
* [[Camera Mod Alternate Sound Disable]]&lt;br /&gt;
* [[Change_the_default_notification.wav_Sound|Change the Default notification.wav Sound]]&lt;br /&gt;
* [[Changes_Alert/Notification_Sounds|Changes Alert/Notification Sounds]]&lt;br /&gt;
* [[Hourly Chime|Hourly Chime]] &lt;br /&gt;
* [[Ignore 'A', 'An', and 'The' In Artist and Album names|Ignore 'A', 'An', and 'The' In Artist and Album names]] &lt;br /&gt;
* [[Messaging Mod Force Offline Send Without Dialog]]&lt;br /&gt;
* [[My notification|My notification]] &lt;br /&gt;
* [[Myavatar In Messaging App|Myavatar In Messaging App]] &lt;br /&gt;
* [[Photos Slideshow|Photos Slideshow]] &lt;br /&gt;
* [[Screenlock On When Connected|Stay On While Connected]]&lt;br /&gt;
* [[Patch Sudoku Disable Zooming|Sudoku: Disable Zooming]]&lt;br /&gt;
* [[Turning Off Dialpad Noise]]&lt;br /&gt;
&lt;br /&gt;
==== The following are deprecated.  They have been replaced with methods which are easier or are moot in 1.1 ====&lt;br /&gt;
&lt;br /&gt;
* [[Installing Homebrew Apps With A Rooted Pre|Installing Homebrew Apps With A Linux Accessed Pre]]  &lt;br /&gt;
* [[Packaging Homebrew Apps for Stock Pre without Rooting|Packaging Homebrew Apps for Stock Pre without Accessing Linux]] &lt;br /&gt;
* [[Modifying Stock Applications|Modifying Stock Applications]] &lt;br /&gt;
&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>TheRaven</name></author>
	</entry>
</feed>