From 9e23319972ad2e16e8764f44bec6fca55199254d Mon Sep 17 00:00:00 2001 From: wz914876 Date: Mon, 1 Jul 2024 13:00:19 +0530 Subject: [PATCH 1/2] 1154 [SEO] Embed Placeholder --- tools/importer/transformers/util.js | 56 +++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 3 deletions(-) diff --git a/tools/importer/transformers/util.js b/tools/importer/transformers/util.js index bf1b3b59..6d1c6f34 100644 --- a/tools/importer/transformers/util.js +++ b/tools/importer/transformers/util.js @@ -189,18 +189,68 @@ export const pdfembed = (embedEl, document) => { embedEl.append(table); }; +const getVideoThumbnail = (url, quality) => { + if (url) { + let videoId; + let thumbnail; + let type; + if (url.match(/youtube\.com.*(\?v=|\/embed\/)(.{11})/) || url.match(/youtu.be\/(.{11})/)) { + const result = url.match(/youtube\.com.*(\?v=|\/embed\/)(.{11})/); + videoId = result.pop(); + type = 'youtube'; + } else if (url.match(/vimeo.*\/(\d+)/i)) { + videoId = url.match(/vimeo.*\/(\d+)/i); + type = 'vimeo'; + } + if (videoId) { + if (typeof quality !== 'undefined') { + let qualityKey = 'maxresdefault'; // Max quality + if (quality === 'low') { + qualityKey = 'sddefault'; + } else if (quality === 'medium') { + qualityKey = 'mqdefault'; + } else if (quality === 'high') { + qualityKey = 'hqdefault'; + } + if (type === 'vimeo') { + thumbnail = `https://vimeo.com/api/oembed.json?url=https%3A//vimeo.com/${videoId}&width=480&height=360`; + } else if (type === 'youtube') { + thumbnail = `http://img.youtube.com/vi/${videoId}/${qualityKey}.jpg`; + } + } + return thumbnail; + } + } + return false; +}; + export const videoembed = (embedEl, document) => { const videoEl = embedEl?.querySelector('iframe'); - embedEl.innerHTML = ''; const anc = document.createElement('a'); let href = videoEl.getAttribute('src'); if (!href.startsWith('https:') && href.includes('vidyard')) { if (href[href.length - 1] === '?') href = href.slice(0, -1); href = `https:${href}`; } + const div = document.createElement('div'); + const p1 = document.createElement('p'); + const thumbnail = getVideoThumbnail(href, 'max'); + if (thumbnail) { + const img = document.createElement('img'); + img.src = thumbnail; + p1.append(img); + div.append(p1); + } anc.href = href; - anc.textContent = 'Video Player'; - embedEl.append(anc); + const p2 = document.createElement('p'); + if (href) { + p2.append([anc]); + div.append(p2); + } + const cells = [['Video Player'], [div]]; + const block = WebImporter.DOMUtils.createTable(cells, document); + embedEl.innerHTML = ''; + embedEl.append(block); return embedEl; }; From 156b7db827ff88ee511b9eab0f647b41bcd6fe4e Mon Sep 17 00:00:00 2001 From: wz914876 Date: Fri, 19 Jul 2024 11:42:45 +0530 Subject: [PATCH 2/2] Updated test cases --- .../test/fixtures/blog3-converted.html | 46 +- .../actions/convert/test/fixtures/blog3.html | 223 ++++++---- .../test/fixtures/product1-converted.html | 32 +- .../convert/test/fixtures/product1.html | 333 +++++++++++---- .../test/fixtures/product3-converted.html | 48 ++- .../convert/test/fixtures/product3.html | 397 ++++++------------ tools/importer/transformers/util.js | 13 +- 7 files changed, 621 insertions(+), 471 deletions(-) diff --git a/tools/actions/convert/test/fixtures/blog3-converted.html b/tools/actions/convert/test/fixtures/blog3-converted.html index c34ffc79..96723673 100644 --- a/tools/actions/convert/test/fixtures/blog3-converted.html +++ b/tools/actions/convert/test/fixtures/blog3-converted.html @@ -1,4 +1,3 @@ -
@@ -9,15 +8,24 @@

Enabling Science at Scale: How Danaher Life Sciences partners deep with Biopharma

-

Video Player

-

The demand for advanced therapeutics and new drug modalities is expected to explode in the coming decade. For example, more than 2,000 gene therapies and modified cell therapies are currently under development, along with 800-plus non-genetically modified cell therapies, according to the American Society of Gene & Cell Therapy. And the development pipeline for monoclonal antibodies grew about 20% in 2022 to include 140 investigational drugs, estimates the Antibody Society.

+ +

The demand for advanced therapeutics and new drug modalities is expected to explode in the coming decade. For example, more than 2,000 gene therapies and modified cell therapies are currently under development, along with 800-plus non-genetically modified cell therapies, according to the American Society of Gene & Cell Therapy. And the development pipeline for monoclonal antibodiesgrew about 20% in 2022 to include 140 investigational drugs, estimates the Antibody Society.

While this is good news for patients awaiting treatments for complex diseases, it presents an immediate scalability challenge to biopharma leaders – one that University of Pennsylvania professor and CAR-T pioneer Dr. Carl June has referred to as a crisis waiting to happen. “My big worry is, what if we actually make … engineered cell therapies work for solid cancer?” June said during the Danaher Genomic Medicines Summit held in December 2022 in Boston. “We just couldn’t meet the demand at this point.”

Indeed, biopharma leaders that are developing cell therapies and other potential cures for large patient populations will need to address bottlenecks in their research, development, and manufacturing processes to meet the expected demand.

Several Life Sciences companies at Danaher Corporation, such as Molecular Devices, Leica Microsystems, SCIEX, IDBS, Beckman Coulter Life Sciences, Aldevron, and Cytiva, offer a wide array of products and services to support the biopharma industry at the point solution level, the automation level, and the data and digitization level. Together they help the industry to embrace an approach that combines scientific rigor with engineering know-how to create stronger innovation. This entails bolstering every stage of biopharma development with engineering principles and practices. Applying this approach will require biopharma developers to adopt automation at every stage, from early discovery through manufacturing, and to lean on artificial intelligence to improve their processes. And it will demand that best practices be industrialized to improve and accelerate the innovation of new cures.

@@ -35,21 +43,27 @@

Enabling Science at Scale: How Danaher Life Sciences partners deep with Biop

About the Author

Vanessa Almendro, Ph.D, MBA, is Vice President of Science and Technology, Head of Innovation at Danaher Corporation, leading multiple initiatives to position Danaher at the forefront of innovation in science, technology, and medicine. Vanessa is also the Founder and Principal for the Brain Cancer Investment Fund, a philanthropic fund aiming at catalyzing the development of cures for brain cancer. Prior to Danaher, Vanessa was the Head of External Strategy and Innovation at the Eisai Center for Genetics Guided Dementia Discovery (G2D2). In this role, Vanessa led the creation of the Eisai Innovation Center Biolabs, the first incubator space specialized in neurology. She also led the development of academic affairs and external innovation strategies in concert with academic investigators, consortiums, biotech, and large pharmaceutical companies. Prior to this role, Vanessa worked as Head of Strategy and Operations for Cogen Immune Medicines, and she held multiple leadership roles at Vertex Pharmaceuticals both in the R&D and Commercial organizations. Prior to industry Vanessa was a Research fellow at the Dana-Farber Cancer Institute, Harvard Medical School and prior to that served as a Group Leader in the Department of Medical Oncology at IDIBAPS in Barcelona, Spain. Vanessa is a Ph.D. in Biochemistry and Molecular Biology from University of Barcelona, a Post-doc in Translational Medicine from the Dana Farber Cancer Institute, Harvard Medical School, and an Executive MBA from MIT-Sloan. She is a mentor for start-up companies at MassConnect, Nucleate Boston Activator, and a member of the Commercial Advisory Board for the School of Biomedical Engineering at UBC.

-
-
-
-
-
-
+
+
brand
+
Danaher
+
readingTime
8
creationDate
-
Thu, 31 Aug 2023 13:25:52 GMT
+
Thu, 01 Feb 2024 15:32:54 GMT
updateDate
-
Wed, 18 Oct 2023 10:40:03 GMT
+
Mon, 27 May 2024 07:02:32 GMT
diff --git a/tools/actions/convert/test/fixtures/blog3.html b/tools/actions/convert/test/fixtures/blog3.html index f14be01e..8c036303 100644 --- a/tools/actions/convert/test/fixtures/blog3.html +++ b/tools/actions/convert/test/fixtures/blog3.html @@ -4,10 +4,12 @@ - + - + + + @@ -36,22 +38,29 @@ - + + - Enabling Science at Scale: How Danaher Life Sciences partners deep with Biopharma | Danaher Life Sciences + + Scaling Science: Danaher Life Sciences Solutions for Biopharma | Danaher Life Sciences - + - + + + + + + @@ -60,12 +69,86 @@ dataLayer = [{ 'user': {"customerID":"","accountType":"guest","marketCode":"","company":"","role":"","city":"","state":"","country":"","postalCode":"","lastVisit":""} },{ - 'page': {"title":"Enabling Science at Scale: How Danaher Life Sciences partners deep with Biopharma | Danaher Life Sciences","language":"en","locale":"US","level":"top","type":"webpage","keywords":"","creationDate":"Aug 31, 2023 01:25:52 PM","updateDate":"Oct 18, 2023 10:40:03 AM"} + 'page': {"title":"Scaling Science: Danaher Life Sciences Solutions for Biopharma | Danaher Life Sciences","language":"en","locale":"US","level":"top","type":"webpage","keywords":"","creationDate":"Feb 01, 2024 03:32:54 PM","updateDate":"May 27, 2024 07:02:32 AM"} }]; + + + + + + + + + + + + + @@ -151,7 +234,7 @@ + @@ -898,14 +951,14 @@

Subscribe - + - + @@ -976,6 +1029,8 @@

Subscribe + + diff --git a/tools/actions/convert/test/fixtures/product1-converted.html b/tools/actions/convert/test/fixtures/product1-converted.html index 9fb79e1c..b58729ca 100644 --- a/tools/actions/convert/test/fixtures/product1-converted.html +++ b/tools/actions/convert/test/fixtures/product1-converted.html @@ -24,7 +24,7 @@

Next-generation fluorescent imaging solution for the assurance of monoclonal

Demonstrating that cell lines are monoclonal – or that a gene was edited as expected – can be a time-consuming and highly-subjective process when relying on conventional technologies. The CloneSelect® Imager and CloneSelect® Imager FL are high-throughput automated solutions for imaging and analyzing mammalian cells. Tracking the formation of a colony from a single cell is effortless as barcoded plates are tracked over time. Automated acquisition and analysis provides accurate, objective, and consistent results.

With high-resolution white light imaging, the CloneSelect Imager provides automated confluence, monoclonality assurance and industry-leading acquisition times with the ability to image a 96-well plate in under two minutes.

The all-new CloneSelect Imager FL features high-contrast multichannel fluorescent and white light imaging that allows for accurate single-cell detection and proof of monoclonality at day 0. Streamline your workflow with comparative confluence assays to identify and verify gene edits.

-
+

:dam-check-box:

@@ -37,10 +37,27 @@

Next-generation fluorescent imaging solution for the assurance of monoclonal

Rapid single-cell confirmation

The imager delivers industry-leading acquisition times, imaging a 96-well plate in as little as two minutes and can verify monoclonality from day zero with fluorescence.

- +
+ + + + + + + + + + + +
Video Player
+

+ +

+

https://play.vidyard.com/WwWUddqbVhBk8jtmGQ6dHF.html

+
+
-

Highlights

@@ -91,7 +108,6 @@

CloneSelect Imager FL

-

Streamlined Workflow

@@ -143,7 +159,7 @@

Streamlined Workflow