
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
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){
SAILPLAY.send('actions.perform', data.actions[0]); //регистрируем выполнение первого действия из списка, полученного с сервера SailPlay
});
SAILPLAY.on('actions.perform.success', function(action){
alert('Действие выполнено успешно: ' + action._actionId);
});
FAQs
SailPlay Widgets Actions plugin
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
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.