Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@lightalex/vk-theme
Advanced tools
Readme
Модуль позволяет определить цветовую схему предпочтительную для отображения пользователю на сайте vk.com, при наличии установленных в браузер пользователем расширений, которые могут влиять на отображение сайта vk.com. Расширение должно уметь отвечать на данные запросы. Для этого расширение может использовать модуль vk-theme-controller.
npm i @lightalex/vk-theme или yarn add @lightalex/vk-theme
vkTheme.subscribe((theme, type) => { ... })
- подписка на получение информации о цветовой схеме и ее изменении. theme
принимает значения dark
(тёмное оформление) или light
(светлое оформление). type
принимает значения extension_theme
(ответ на запрос цветовой схемы) или extension_theme_changed
(цветовая схема была изменена).
vkTheme.unscribe(null | (theme, type) => { ... })
- удаление подписки. В качестве аргумента может принимать функцию обратного вызова, которая была передана в метод subscribe
. В таком случае отписка произвойдет только для одной функции обратного вызова.
vkTheme.get()
- запрос на получение цветовой схемы. Ответ будет получен в функцию обратного вызова, которая должна быть передана заранее в методе subscribe
. type
в функции обратного вызова будет равен extension_theme
.
import vkTheme from '@lightalex/vk-theme';
vkTheme.subscribe((theme, type) => {
document.body.setAttribute('scheme', theme === 'dark' ? 'space_gray' : 'client_light');
});
vkTheme.get();
FAQs
You can get theme (light or dark) generated by custom extensions on vk.com site full version
The npm package @lightalex/vk-theme receives a total of 3 weekly downloads. As such, @lightalex/vk-theme popularity was classified as not popular.
We found that @lightalex/vk-theme demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.