Yes, I've done this before - with a little help from foosion...
// ==PREPROCESSOR==
// @author "marc2003 / foosion"
// @name "Panel Receiver"
// ==/PREPROCESSOR==
var script = window.GetProperty("current_script", "path\\to\\biography.js");
var pre = "";
var text = utils.ReadTextFile(fb.ProfilePath + script);
var lines = text.split("\n");
if (lines[0].indexOf("// ==PREPROCESSOR==") == 0) {
for (var i = 0; i < lines.length; i++) {
if (lines[i].indexOf("// @import") == 0) {
var fq = lines[i].indexOf("\"") + 1;
var lq = lines[i].lastIndexOf("\"") - fq;
var file = lines[i].substr(fq, lq).replace("%fb2k_profile_path%", fb.ProfilePath).replace("%fb2k_component_path%", fb.ComponentPath);
pre += utils.ReadTextFile(file) + "\n";
} else if (lines[i].indexOf("// ==/PREPROCESSOR==") == 0) {
break;
}
}
}
eval(pre + text);
(function (global) {
var original_callback = global.on_notify_data;
global.on_notify_data = function (name, info) {
if (name == "load_script") {
if (utils.FileTest(fb.ProfilePath + info, "e")) {
window.SetProperty("current_script", info);
window.Reload();
}
} else if (original_callback) {
original_callback(name, info);
}
}
})(this);
The only thing you should edit is the default script it loads on the first line...
"path\\to\\biography.js"
It must be in subfolder of your profile path.
Then in your other panel...
window.NotifyOthers("load_script", "path\\to\\biography.js");
or
window.NotifyOthers("load_script", "path\\to\\playlist view.js");
Again these must be relative in your profile folder.