Is that code added in the text file or the .js file?
In text file .You should probably make copy of it first
// ==PREPROCESSOR==
// @name "Last.fm Artist Info/User Charts/Recommendations"
// @author "marc2003"
// @feature "v1.4"
// @feature "watch-metadb"
// @import "%fb2k_profile_path%wsh_marc2003\js\lodash.min.js"
// @import "%fb2k_profile_path%wsh_marc2003\js\helpers.js"
// @import "%fb2k_profile_path%wsh_marc2003\js\panel.js"
// @import "%fb2k_profile_path%wsh_marc2003\js\lastfm.js"
// @import "%fb2k_profile_path%wsh_marc2003\js\list.js"
// ==/PREPROCESSOR==
var panel = new _.panel("Last.fm Artist Info/User Charts/Recommendations", ["metadb", "custom_font"]);
var lastfm = new _.lastfm();
//lastfm.api_key = "abc123"; //uncomment these 2 lines
//lastfm.secret = "abc123"; //and edit accordingly
var list = new _.list("lastfm_info", 10, 30, 0, 0);
var bs = 32;
var buttons = new _.buttons();
list.lastfm_change_mode = function (m) {
this.lastfm_artist_method = m;
window.SetProperty("2k3.lastfm_mode", this.lastfm_mode); //store the value so it's remembered on panel reload/foobar restart
this.artist = ""; //the panel won't update if the artist doesn't change so i just clear it
panel.item_focus_change(); //this calls the function that refreshes the panel - don't repaint because it's already done for you
}
buttons.buttons.sartist = new _.button(0, 20, bs, bs, {normal : "buttons\\sartist.png"}, function () {list.lastfm_change_mode(1);} , "similer artist");
buttons.buttons.tags = new _.button(bs, 20, bs, bs, {normal : "buttons\\tags.png"}, function () { list.lastfm_change_mode(2); }, "top tags");
buttons.buttons.talbum = new _.button(bs * 2, 20, bs, bs, {normal : "buttons\\talbum.png"}, function () { list.lastfm_change_mode(3); }, "top albums");
buttons.buttons.top = new _.button(bs * 3, 20, bs, bs, {normal : "buttons\\top.png"}, function () { list.lastfm_change_mode(4);}, "top tracks");
panel.item_focus_change();
function on_notify_data(name, data) {
lastfm.notify_data(name, data);
}
function on_size() {
panel.size();
list.w = panel.w - 20;
list.h = panel.h - 24;
list.size();
}
function on_paint(gr) {
panel.paint(gr);
gr.FillSolidRect(0, 0, panel.w, 24, panel.colours.header);
gr.GdiDrawText(list.header_text(), panel.fonts.title, panel.colours.highlight, 10, 0, panel.w - 20, 24, LEFT);
list.paint(gr);
buttons.paint(gr);
}
function on_metadb_changed() {
list.metadb_changed();
}
function on_mouse_wheel(s) {
list.wheel(s);
}
function on_mouse_move(x, y) {
list.move(x, y);
buttons.move(x, y);
}
function on_mouse_lbtn_up(x, y) {
list.lbtn_up(x, y);
buttons.lbtn_up(x, y);
}
function on_key_down(k) {
list.key_down(k);
}
function on_mouse_rbtn_up(x, y) {
return panel.rbtn_up(x, y, list);
}
and you should edit 29-32 lines to relevent image names(buttons\\sartist.png) and put relevant png buttons in wsh_marc2003\images\buttons folder named accordingly