b4ca46a165
On Firefox, clicking a bookmarklet will cause the page to display the last return value of the bookmarklet, deleting the rest of the page contents. The solution is to add undefined; at the end.
12 lines
179 B
JavaScript
12 lines
179 B
JavaScript
javascript:
|
|
function rename()
|
|
{
|
|
var new_title = prompt("New page title:");
|
|
if (new_title !== null)
|
|
{
|
|
document.title = new_title;
|
|
}
|
|
}
|
|
|
|
rename();
|
|
undefined;
|