I just stuck this in my conkeror-rc:
<<<<<
var major_mode = null;
define_window_local_hook("major_mode_change_hook");
function maybe_gmail_mode(buffer, request, location)
{
if (location.host == "mail.google.com")
major_mode = "gmail";
else
major_mode = null;
major_mode_change_hook.run(buffer.window);
}
add_hook("content_buffer_location_change_hook", maybe_gmail_mode);
function major_mode_widget(window) {
this.name = "major-mode-widget";
text_widget.call(this, window);
this.add_hook("major_mode_change_hook");
}
major_mode_widget.prototype.__proto__ = text_widget.prototype;
major_mode_widget.prototype.update = function () {
this.view.text = major_mode ? "(" + major_mode + ")" : "";
};
add_hook("mode_line_hook", mode_line_adder(major_mode_widget));
>>>>>
It doesn't actually do anything except display the word "gmail" in the
mode-line. Oh, and "major_mode" is global rather than buffer-local.
And the major mode change hook is window-local when it should probably
be buffer-local. But it's a vague start.
--dave
--
David Glasser | [EMAIL PROTECTED] | http://www.davidglasser.net/
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror