How to use customized icon for Firefox omnibox search suggestion - firefox-addon-webextensions

I want to my Firefox extension could use Firefox omnibox and return user some suggestions when input changed.
At current stage, the omnibox could give me some suggestions, but the icon of the suggestion is still default instead of icon of the website. I already set my extension icon in manifest.json and size of icon is 16px by 16px and 32px by 32px with 7kb.
Should I set suggestion icon somewhere else?
I follow the example from this: https://github.com/mdn/webextensions-examples/tree/master/firefox-code-search

Related

Tailwind CSS "sm:block" class is not overwriting "hidden" class after passing the "sm:" breakpoint

I am following a navbar tutorial from the creator of TailwindCSS on Youtube and I am stuck on this part, where the sm:block class should override the hidden class when the screen width hits the sm: breakpoint.
This almost exactly the same example works as expected, where the items show when the page's width is increased.
However, when I try to implement this on my project which is created using npx create-next-app --example blog-starter-typescript. This is where I got it from, the items on the navbar don't show when the page width is increased.
Here is the exact spot in my repo where this doesn't work.
If I replace hidden sm:block with sm:hidden block it works. and if I add a different background colour to each breakpoint, that also works.
Can anyone see what I am doing wrong?
Thanks
"Dark Theme for Chrome" extension has been injecting styling that had display : hidden !important in it. Removing that extension has resolved my issue.
I realised this after seeing the app working as expected in incognito mode.

Quill editor popUp is being cutoff in the left when we try to add link

When I try to add link to very left text in quill editor the popUp opened is hiding in the left side.And I am using Snow theme.
The below image shows my issue.
Not the most elegant solution, but you may need to override the css:
.ql-tooltip {
left: 0!important;
}
Sometimes quilljs doesn't play nice with theming libraries like certain versions of bootstrap (which was the issue in my case).

How to style monaco editor context menu

I need to change the css style of the default context menu but I couldn't inspect the classes because it's closed when it out of focus, so if any one knows the classes or know how to adjust the style using javascript can help.
Press F12 to show the console. Input the code and press enter.
setTimeout(() => {debugger;}, 1000);
You may open the context menu in 1 second before the browser paused. Then you can inspect the element.
.monaco-menu > .monaco-action-bar.vertical {
color: red !important;
}
But since 0.12 the context menu is under shadow-root and the there is no element declare part attribute. So in the host there is no way to rewrite the style.
I had similar issue, where I needed to replace the icons that appear in the completion menu.
From the Network tab of the browser, I opened the file editor.main.css.
There, you can see the css selectors, and the embedded svg-xml for the icons.
For example, to replace the icons used for 'methods' or 'functions' in the completion menu, add this to your html (after the Monaco stylesheet is loaded)
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon.method::before,
.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon.function::before
/* copied from lightbulb */
{ background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xMS42NzA4IDguNjU4MDZDMTEuMzMxOSA4Ljk5MTYgMTEuMDcxNiA5LjM2Mjc4IDEwLjg4ODYgOS43NzE3MkMxMC43MTA1IDEwLjE3OTIgMTAuNjIxIDEwLjYyMTkgMTAuNjIxIDExLjEwMDlWMTIuNzAxMkMxMC42MjEgMTIuODgwNyAxMC41ODcyIDEzLjA1MDMgMTAuNTE4OSAxMy4yMDkxQzEwLjQ1MTMgMTMuMzY2MSAxMC4zNTg2IDEzLjUwMzggMTAuMjQwNyAxMy42MjEzQzEwLjEyMjggMTMuNzM4OCA5Ljk4NDY0IDEzLjgzMTEgOS44MjcyMyAxMy44OTg0QzkuNjY4MDYgMTMuOTY2MyA5LjQ5ODA2IDE0IDkuMzE4MjMgMTRINy43MTIwNUM3LjUzMjIzIDE0IDcuMzYyMjMgMTMuOTY2MyA3LjIwMzA2IDEzLjg5ODRDNy4wNDU2NCAxMy44MzExIDYuOTA3NTMgMTMuNzM4OCA2Ljc4OTYxIDEzLjYyMTNDNi42NzE2OCAxMy41MDM4IDYuNTc4OTUgMTMuMzY2MSA2LjUxMTQxIDEzLjIwOTFDNi40NDMxMSAxMy4wNTAzIDYuNDA5MjcgMTIuODgwNyA2LjQwOTI3IDEyLjcwMTJWMTEuMTAwOUM2L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MgMTIuMTA1NiA4LjIyOTAzIDExLjY3MDggOC42NTgwNlpNOS42MjE2MiAxMC41SDcuNDA4NjdWMTIuNzAxMkM3LjQwODY3IDEyLjc4MjMgNy40MzcyIDEyLjg1MTIgNy40OTg4OCAxMi45MTI3QzcuNTYwNTggMTIuOTc0MSA3LjYzMDA3IDEzLjAwMjggNy43MTIwNSAxMy4wMDI4SDkuMzE4MjNDOS40MDAyMiAxMy4wMDI4IDkuNDY5NzEgMTIuOTc0MSA5LjUzMTQgMTIuOTEyN0M5LjU5MzA5IDEyLjg1MTIgOS42MjE2MiAxMi43ODIzIDkuNjIxNjIgMTIuNzAxMlYxMC41WiIgZmlsbD0iI0ZGQ0MwMCIvPgo8L3N2Zz4K) !important; }

Ext.get('myPanel').el.setOpacity(0.65) is not working in IE 8 compatibility mode

I'm trying to set opacity for extjs (4.2.1) panel (whose id is myPanel) as Ext.get('myPanel').el.setOpacity(0.65). It works fine in firefox and chrome but not in IE 8. The ultimate goal is to make the panel transparent so that the user can see through it. Could any one please help me with this...
Ext will simply apply the CSS property "opacity" or alpha transparency to an HTML element. In IE8 this is almost in no case supported.
You could however use a plugin or hack to make IE 8 compatible with it.
Check http://css3pie.com/ or http://modernizr.com/ for example.
Also check http://www.electrictoolbox.com/opacity-internet-explorer-css3-pie-alpha-transparency/ for an example of your issue, and how it is solved using PIE
When you dont want to use 3rd party plugins, you can also try this:
Add the following rules to the CSS of your property
/* IE8 */-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 5-7 */ filter: alpha(opacity=50);
You can also do this with Ext.js using Ext.get('myPanel').el.setStyle()
e.g.
Ext.get('myPanel').el.setStyle('-ms-filter','progid:DXImageTransform.Microsoft.Alpha(Opacity=50)');
Finally..after breaking my head for as while..I came up with 2 solutions...
1) Apply x-panel-ghost (which is an extjs in build css applied during the drag process) for baseCls or componentCls gave the transparency. But all the other default css for a extjs panel are lost and so we have to manually write them up..
2) The best solution would be to set an image which is made transparent (through photoshop or something) as a background image for the panel header and body and apply it to the cls config of the panel as below:
In panel:
cls: 'transparency',
In css file:
.transparency .x-panel-header{
background: transparent url('../image.png') no-repeat center !important;
}
And in the same way, for the body as well..
Hope this helps someone...

Remove Aloha-Editor Blue Focus Outline

I'm very new to Aloha (WYSIWYG) Editor and i would like to know how to remove/disable its blue outline then the editing field is on focus.
I've managed to disable the yellow highlight outlines, but couldn't find a way to disable the blue on focus border outline.
Any friendly advice?
Thanks.
This blue outline is made by the "highlighteditables" plugin's CSS src/plugins/common/highlighteditables/css/highlighteditables.css:
.aloha-editable-active, .aloha-editable-active[contenteditable=true]:focus {
outline: #80B5F2 solid 5px !important;
}
Check that when running the inspector in the web browser, selecting the element and disabling this style helps.
Note the ugly programming style with !important :(
Unfortunately, as you can can choose plugins to load you only choose JavaScript, CSS of all the plugins enabled during the build are merged into the aloha.css and are always loaded.
One way to fix it is to build the editor yourself. Basic introduction is described in section "4.3 Customized Builds" of Develop Aloha Editor guide.
As building Aloha yourself requires some effort, you may be interested in quick workaround using the inline style:
outline: none !important;
for the element you have problem with. Note the !important keyword - it is required.

Resources