New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hexo-tag-dailymotion

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-tag-dailymotion - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

.github/workflows/node.js.yml

27

index.js
'use strict';
const { htmlTag } = require('hexo-util');
const dailymotionTag = require('./lib/dailymotion.js')
/**
* Dailymotion tag
*
* Syntax:
* {% dailymotion [player:player_id] [video:video_id] [playlist:playlist_id] %}
*/
hexo.extend.tag.register('dailymotion', function (args) {
const arg = args.join(' ');
const [, player=null] = arg.match(/\s*player:(\w+)/i) || [];
const [, video=null] = arg.match(/\s*video:(\w+)/i) || [];
const [, playlist=null] = arg.match(/\s*playlist:(\w+)/i) || [];
const playerPath = player ? `player/${player}.js` : `player.js`;
return htmlTag('script', {
src: `https://geo.dailymotion.com/${playerPath}`,
class: 'video-container',
...(video ? {'data-video': video} : null),
...(playlist ? {'data-playlist': playlist} : null),
}, '', false);
});
hexo.extend.tag.register('dailymotion', dailymotionTag);
{
"name": "hexo-tag-dailymotion",
"version": "1.0.0",
"version": "1.1.0",
"description": "A tag plugin to embed Dailymotion video player in your Hexo blog",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "node ./test/dailymotion.test.js"
},

@@ -27,3 +27,8 @@ "keywords": [

},
"homepage": "https://github.com/dharFr/hexo-tag-dailymotion#readme"
"homepage": "https://github.com/dharFr/hexo-tag-dailymotion#readme",
"devDependencies": {
"cli-color": "^2.0.3",
"hexo-util": "^3.0.1",
"node-html-parser": "^6.1.4"
}
}
# hexo-tag-dailymotion
A tag plugin to embed Dailymotion video player in your Hexo blog
![npm](https://img.shields.io/npm/v/hexo-tag-dailymotion.svg) ![npm](https://img.shields.io/npm/l/hexo-tag-dailymotion.svg)
[![npm](https://img.shields.io/npm/v/hexo-tag-dailymotion.svg)](https://www.npmjs.com/package/hexo-tag-dailymotion) [![npm](https://img.shields.io/npm/l/hexo-tag-dailymotion.svg)](https://github.com/dharFr/hexo-tag-dailymotion/blob/main/LICENSE)

@@ -53,3 +53,3 @@

#### Embed a video and aplaylist
#### Embed a video and a playlist

@@ -75,1 +75,22 @@ ```

```
#### Embed a player with parameters
```
{% dailymotion player:xakn video:x84sh87 params:startTime=15 %}
```
will inject the following into hexo rendered page or post
``` html
<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" data-params="startTime=15"></script>
```
---
```
{% dailymotion player:xakn video:x84sh87 params:startTime=15&mute=true&loop=true %}
```
will inject the following into hexo rendered page or post
``` html
<script src="https://geo.dailymotion.com/player/xakn.js" data-video="x84sh87" data-params="startTime=15&mute=true&loop=true"></script>
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc