Skip to content

Commit

Permalink
Clean up custom css string and fix issue with search by image on some…
Browse files Browse the repository at this point in the history
… devices
  • Loading branch information
bijij committed Apr 24, 2020
1 parent 8cc942f commit 38c81fa
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
20 changes: 18 additions & 2 deletions js/content-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ function addSearchImageButton(container, imageURL, version) {
link = container.querySelector('.irc_ft > a.irc_help');
break;
case VERSIONS.OCT19:
link = container.querySelector('.PvkmDc');
link = container.querySelector('.PvkmDc, .qnLx5b');
break;
}

Expand Down Expand Up @@ -369,5 +369,21 @@ if (DEBUG)
console.log('ViewImage: Injecting CSS...');

var customStyle = document.createElement('style');
customStyle.innerText = '.irc_dsh>.irc_hol.vi_ext_addon,.irc_ft>.irc_help.vi_ext_addon,.PvkmDc.vi_ext_addon{margin: 0 4pt!important}.irc_hol.vi_ext_addon{flex-grow:0!important}.ZsbmCf.vi_ext_addon{flex-grow:0}';
customStyle.innerText = `
.irc_dsh>.irc_hol.vi_ext_addon,
.irc_ft>.irc_help.vi_ext_addon,
.PvkmDc.vi_ext_addon,
.qnLx5b.vi_ext_addon
{
margin: 0 4pt!important
}
.irc_hol.vi_ext_addon
{
flex-grow:0!important
}
.ZsbmCf.vi_ext_addon{
flex-grow:0
}`;
document.head.appendChild(customStyle);
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "__MSG_appName__",
"version": "3.3.0",
"version": "3.3.1",
"description": "__MSG_appDesc__",
"default_locale": "en",
"icons": {
Expand Down

0 comments on commit 38c81fa

Please sign in to comment.