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

hexo-generator-amp

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-generator-amp - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

8

lib/generator.js

@@ -111,6 +111,6 @@ 'use strict';

//------------------------------------
var youtubeMatch = replaceStr.match(/\<iframe\ssrc\=\"\/\/www\.youtube\.com\/embed\/[0-9a-zA-Z]+\"\sframeborder\=\"0\"\sallowfullscreen\>\<\/iframe\>/g);
var youtubeMatch = replaceStr.match(/\<iframe\ssrc\=\"\/\/www\.youtube\.com\/embed\/[0-9a-zA-Z-]+\"\sframeborder\=\"0\"\sallowfullscreen\>\<\/iframe\>/g);
if(youtubeMatch){
for(i=0; i<youtubeMatch.length; i++){
var youtueb_id = youtubeMatch[i].match(/\/embed\/([0-9a-zA-Z]+)\"/);
var youtueb_id = youtubeMatch[i].match(/\/embed\/([0-9a-zA-Z-]+)\"/);
replaceStr = replaceStr.replace(youtubeMatch[i],'<amp-youtube data-videoid="'+youtueb_id[1]+'" width="1920" height="1080" layout="responsive"></amp-youtube>');

@@ -124,6 +124,6 @@ isYoutubeContain = true;

//------------------------------------
var vimeoMatch = replaceStr.match(/\<iframe\ssrc\=\"\/\/player\.vimeo\.com\/video\/[0-9a-zA-Z]+\"\sframeborder\=\"0\"\sallowfullscreen\>\<\/iframe\>/g);
var vimeoMatch = replaceStr.match(/\<iframe\ssrc\=\"\/\/player\.vimeo\.com\/video\/[0-9a-zA-Z-]+\"\sframeborder\=\"0\"\sallowfullscreen\>\<\/iframe\>/g);
if(vimeoMatch){
for(i=0; i<vimeoMatch.length; i++){
var youtueb_id = vimeoMatch[i].match(/\/video\/([0-9a-zA-Z]+)\"/);
var youtueb_id = vimeoMatch[i].match(/\/video\/([0-9a-zA-Z-]+)\"/);
replaceStr = replaceStr.replace(vimeoMatch[i],'<amp-vimeo data-videoid="'+youtueb_id[1]+'" width="1920" height="1080" layout="responsive"></amp-vimeo>');

@@ -130,0 +130,0 @@ isVimeoContain = true;

{
"name": "hexo-generator-amp",
"version": "0.0.6",
"version": "0.0.7",
"main": "index",

@@ -5,0 +5,0 @@ "dependencies": {

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