I remastered a downscaled Puppy Linux v. 5.10 and 5.11 to serve as a
dedicated TiddlyWiki OS ( http://tiddlywiki.com):
I was wondering if I could customize Webian Shell to run on Puppy
Linux - on top of ie OpenBox.
I would simply set it up to start when OpenBox is loaded effectively
taking over and hide the desktop.
TiddlyWiki has plugins for browsing files and directories - and run
executable files, so it would obviously be a great companion for
webian...
Cheers Måns Mårtensson
Cheers Måns Mårtensson
On 6 Dec., 22:23, Måns <humam...@gmail.com> wrote:
> Hi Ben
>
> I remastered a downscaled Puppy Linux v. 5.10 and 5.11 to serve as a
> dedicated TiddlyWiki OS (http://tiddlywiki.com):
> As for your feature request, I may be able to throw something together for you, I just need to familiarize myself with TiddlyWiki.
Great :-) I look forward to see what you might come up with!!
> Ben is now actively working with Mozilla on a new project, Boot2Gecko,
> which is going to be the new base for Webian.
Ok - Thanks for the info.
> Thank you for your interest in Webian, and I will let you know when I have
> your feature request implemented in my github account.
Thanks for answering my post!
Imo we might remove the address line and have icons for specified
htmlapps (like TW) instead.
My point is that if there's no address line then users won't expect
Webian to behave like a normal browser - which imho would be a pity,
because Webian doesn't "remember" browser history, autosuggest
addresses etc...
If we either:
1) have a directory where any local html app will show up as a tab/
icon in Webian - or
2) Feature a simple config (text) file where we could add URLs and
local files as a line separated list - and they would show up as tabs/
icons in Webian
Then it should be quite easy to setup a TiddlyWiki to control either:
what apps are in the directory (save as -> new app) - or: locate/edit
the config file, whenever needed...
Cheers Måns Mårtensson
>It should be relatively simple to achieve what you're looking
> to achieve using JavaScript.
Ok - Thanks for joining the thread :-)
Two (simple?) questions.
1) How do I change the link http://webian.org/shell/welcome/0.1/ in
the main.js file, to a *relative* link to a local html file??
I need to use a relative link because I'd like my setup to be
portable..
2) If I should modify/hardcode main.js to open several tabs with
different local htmls (not just one) - what would the code look like?
Cheers Måns Mårtensson
1) How do I change the link http://webian.org/shell/welcome/0.1/ in
the main.js file, to a *relative* link to a local html file??
2) If I should modify/hardcode main.js to open several tabs with
different local htmls (not just one) - what would the code look like?
> You probably need to use a file:// URL? Not sure if that can be relative.
In FF portable it's possible to set a local homepage as a relative
path in a config.ini file:
LocalHomepage=SubFolderName/SomeTitle.html
I can't find documentation explaining how to use relative file URLs in
FF anywhere - so I guess it's not possible..
I did find some documentation explaining the the new File.url object -
starting with FF v. 4.:
http://hacks.mozilla.org/2010/07/firefox-4-formdata-and-the-new-file-url-object/
I'm not sure if Webian (based on Gecko 2 - which is corresponding to
FF version??) can handle file.urls??
> I think you need several calls to newTab() in the $(document).ready(function()... section of code, you could iterative over an array of URLs if you want.
Thanks for your answer :-)
I really know nothing about javascript - I'm a copy/paste sort of guy.
I guess I need to do sth. about this chunk of code:
* Creates a new tab & corresponding window and selects that tab
*/
function newTab(url) {
// Create new window from template
var newWindow = $("#window_template").clone();
// Generate unique ID for window
var randomNumberString = Math.random() + "";
var windowId = randomNumberString.substring(2);
newWindow.attr("id", "window_" + windowId);
// Add new window to interface
$("#windows").append(newWindow);
// Add corresponding tab
$("#tabs ul").append('<li id="tab_' + windowId +
'" class="tab"><a href="javascript:null()"></a></li>');
// Select new tab
selectTab(windowId);
// Add a new iFrame to new window
var newIframe = makeIframe(windowId);
$("#windows .selected .window_toolbar").after(newIframe);
// Register window event listeners
registerWindowEventListeners(windowId);
// Attach iFrame progress monitor
attachIframeProgressMonitor(windowId);
// Create history array for window, using first element as index
urlHistory[windowId] = [];
urlHistory[windowId][0] = 0;
// Navigate to URL if provided
if(url) {
$("#windows .selected .url_input").val(url);
navigate(windowId);
}
}
/**
* Close Tab
*
* Closes tab & window corresponding to provided windowId
*
* @param {String} windowId
*/
function closeTab(windowId) {
// Remove selected window & corresponding tab
$("#window_" + windowId).remove();
$("#tab_" + windowId).remove();
// If no tabs are open, activate home screen
if($(".window").length < 2) {
activateHomeScreen();
// otherwise, Select last remaining tab (not including the template
window!)
} else {
var newLastWindowId = $
(".window:not(#window_template)").last().attr("id").substring(7);
selectTab(newLastWindowId);
}
// Remove browsing history for tab
urlHistory.splice(windowId, 1);
}
/**
* Navigate
*
* Sets the src attribute of the iFrame belonging to the window
specified by
* windowId in order to navigate to a resource identified by the URI
in the
* address bar of that window. Also fetches favicon for the resource.
*
* @param windowId of window to use
*/
function navigate(windowId) {
// invoked when the user hits the go button or hits enter in
url box
var address = url.guess($.trim($
("#windows .selected .url_input").val()));
// trigger navigation
$("#windows .selected .window_iframe").attr("src", address);
// Fetch favicon for window
favicon.fetch(address, function(faviconUrl) {
var img = $("<img>").attr("src", faviconUrl);
img.attr("width", 16);
img.attr("height", 16);
$("#tab_" + windowId + " a").empty();
$("#tab_" + windowId + " a").append(img);
});
}
/**
* Activate Home Screen
*
* Hides all windows and shows the home screen
*/
function activateHomeScreen() {
$("#windows .selected").removeClass("selected");
$("#tabs .selected").removeClass("selected");
$("#windows").removeClass("active");
$("#home_screen").addClass("active");
$("#home_button").removeClass("active");
$("#tabs").addClass("detached");
}
/**
* Activate Windows
*
* Hides the home screen and makes the windows container active
*/
function activateWindows() {
$("#home_screen").removeClass("active");
$("#windows").addClass("active");
$("#home_button").addClass("active");
$("#tabs").removeClass("detached");
}
// When Shell starts up...
$(document).ready(function() {
// Set clock to be updated every second
self.setInterval("clock()",1000);
// Create first tab
newTab("file:///A:/bsolutePath/To/My/SomeTitle.html");
----
Can I simply add new "newTab("URL.file.html");" lines to the end of
this snippet - or can I write a comma or whitespace separated list of
urls inside the paranthesis??
Sorry if I'm asking questions that would/should be clear to all
JSprogrammers out there - however I don't know javascript - except
from the snippets I encounter when using TiddlyWiki...
Cheers Måns Mårtensson