3

Is there any workaround to customize the tab hover card of chrome 78+? By customize I mean to change the text of the hover card.

The page was opened blank and then html text is added using write function. Then I changed the title.

var win = window.open();
win.document.write(htmlText);
win.document.title = htmlFileName

My actual problem is, when I hover a tab it shows 'Loading...' instead of the actual title(value of htmlFileName).

"I know that it is not a good move to ask the user to set the chrome flag tab-hover-cards to disabled" Also, the solution should support ie9+

NSk
  • 31
  • 3

2 Answers2

1

Though this issue is more than 1 year old. Still I would like to suggest a solution. Please try the below:

var win = window.open("about:blank");
win.document.write(htmlText);
win.document.title = htmlFileName

Adding "about:blank" inside window.open will show the title of the page on tab hover card instead of "loading...."

Sven Eberth
  • 3,057
  • 12
  • 24
  • 29
0

Adding win.document.close() doesnt keep the tab in the loading state.

var win = window.open();
win.document.write("<html>Hi</html>");
win.document.title = "Testing";
win.document.close();

The above piece of code worked for me.

Anirudh
  • 437
  • 2
  • 10