webOS Nation Forums >  Homebrew >  webOS patches > can you add a patch to the source HTML
can you add a patch to the source HTML

  Reply
 
LinkBack Thread Tools Display Modes
Old 08/13/2009, 07:42 AM   #1 (permalink)
Member
 
silversuperman's Avatar
 
Join Date: Jun 2009
Location: Michigan
Posts: 34
Likes Received: 0
Thanks: 21
Thanked 2 Times in 2 Posts
Default can you add a patch to the source HTML

I'm using WebOS Quickinstall to pull the Html out of the Pre and edit it and Put it back... I'm not too familiar with Html and i was wondering is it possible to apply a patch to a file of Html??? do you just add it to the bottum or do u have to add it somewhere specific or can you not do it at all?

Also on the patches how much of it should be included. for example on the battery percentage patch below do you add the whole thing or do you copy and paste a certian portion of it... do you start at the --- .orig/usr/lib/ ... or do you start at the +++ /urs/lib/luna/system ... I guess I just need some more insight on the use of patches to the html... I do back up all the originals in a separte folder in case i screw it up. I'm really enjoy playing with html but i need more help PLEASE!!!!!

--- .orig/usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js
+++ /usr/lib/luna/system/luna-systemui/app/controllers/bar-assistant.js

Mojo.Log.info("SystemUI Power Payload "+ Object.toJSON(payload));
// Is the battery level provided?
- if (payload.percent_ui != undefined) {
+ if (payload.percent != undefined) {
//Save the Battery Percentage
- this.batteryLevel = payload.percent_ui;
+ this.batteryLevel = payload.percent;
for (var i = 0; i < this.powerIndicator.length; i++) {
- if (payload.percent_ui > this.powerIndicator[i])
+ if (payload.percent > this.powerIndicator[i])
continue;
this.lastBatteryLevel = i;
this.lastBatteryLevelPayload = payload;
@@ -1397,7 +1397,7 @@
$('power').className = 'battery-' + i;

//Show Banner Message if the Battery level is below 20%
- var batteryalert = $L("#{percent_ui}% battery remaining").interpolate(payload);
+ var batteryalert = $L("#{percent}% battery remaining").interpolate(payload);
if(this.batteryLevel <= 5 && !this.batteryLevel5Shown) {
this.batteryLevel5Shown = true;
this.showLowBatteryAlert();
@@ -1423,7 +1423,7 @@
}
else {
Mojo.Log.info("SystemUI- Is Charging "+ this.isCharging );
- if(payload.percent_ui == 100)
+ if(payload.percent == 100)
$('power').className = 'battery-charged';
else
$('power').className = 'battery-charging-' + i;Old Patch
// show-actual-battery-percent
silversuperman is offline   Reply With Quote
Reply

 

Tags
html, patch, quickinstall, root, webos

Thread Tools
Display Modes



 


Content Relevant URLs by vBSEO 3.6.0