
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
sailplay-hub-actions
Advanced tools
SAILPLAY.HUB.ACTIONS расширяет стандартный функционал SAILPLAY.HUB, позволяя быстро и удобно работать с действиями SailPlay
Если вы используете npm:
npm install sailplay-hub-actions --save
SAILPLAY.HUB.ACTIONS требует для работы сам хаб, поэтому необходимо добавить на страницу теги:
<script src="путь до файла sailplay.hub.js"></script>
<script src="путь до файла sailplay.hub.actions.js"></script>
В первую очередь, необходимо запустить хаб для вашей компании:
SAILPLAY.send('init', { partner_id: 206 }); //инициируем модуль для партнера с айди = 206
Плагин добавляет в хаб следущие события:
##actions.parse
SAILPLAY.send('actions.parse', actions); //Находит все элементы в документе,
//которые помечены атрибутом "data-sp-action" и добавляет к ним функционал действий,
//переданных в качестве второго параметра
Пример html кода действия для парсинга
<div data-sp-action="action._actionId"></div>
Где:
SAILPLAY.send('actions.perform', action); //Инициирует выполнение действия, переданного в качестве второго параметра.
После выполнения действия инициируются следущие события:
Все события возвращают объект, содержащий ответы сервера.
SAILPLAY.on('actions.perform.error', function(err){
sp_app.log(JSON.stringify(err));
});
SAILPLAY.on('actions.perform.success', function(action){
SAILPLAY.send('load.actions.list');
sp_app.log(JSON.stringify(action));
});
//после выполнения действия необходимо перезагрузить список
SAILPLAY.on('actions.perform.complete', function(action){
SAILPLAY.send('load.actions.list');
sp_app.log(JSON.stringify(action));
});
//после привязки аккаунта необходимо перезагрузить список действий
SAILPLAY.on('actions.social.connect.complete', function(action){
SAILPLAY.send('load.actions.list');
sp_app.log(JSON.stringify(action));
});
SAILPLAY.on('actions.social.connect.success', function(action){
SAILPLAY.send('load.actions.list');
sp_app.log(JSON.stringify(action));
});
http://saike.ru/sailplay/widgets/demo/dev/
Исходный код страницы находится в данном репозитарии в директории: /demo/dev/
##SailPlay Actions работа с мобильными платформами
Из-за плохой совместимости с технологией WebView, для мобильных платформ наобходимо использовать свой механизм шарингов, вступлений в группу и лайков.
Так же необходимо инициировать sailplay.hub с флагом platform = mobile.
SAILPLAY.send('init', { partner_id: 206, platform: 'mobile' }); //инициируем модуль для партнера с айди = 206 для мобильных платформ
После выполнения пользователем социального действия, для регистрации его в системе SailPlay, используйте метод actions.perform:
SAILPLAY.send('load.actions.list');
SAILPLAY.on('load.actions.list.success', function(data){
//все необходимые данные, включая тексты шарингов, настройки айди групп и приложения находятся внутри data
//тут любой ваш код для шаринга с необходимым действием: data.actions[n]
SAILPLAY.send('actions.perform', data.actions[0]); //регистрируем выполнение первого действия из списка, полученного с сервера SailPlay
});
SAILPLAY.on('actions.perform.success', function(action){
alert('Действие выполнено успешно: ' + action._actionId);
});
FAQs
SailPlay Widgets Actions plugin
The npm package sailplay-hub-actions receives a total of 68 weekly downloads. As such, sailplay-hub-actions popularity was classified as not popular.
We found that sailplay-hub-actions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.