mirror of
https://github.com/outline/outline.git
synced 2026-06-23 08:14:24 +03:00
4baf5ce99a
Update slides to only embed pub links
26 lines
476 B
JavaScript
26 lines
476 B
JavaScript
// @flow
|
|
import * as React from 'react';
|
|
import Frame from './components/Frame';
|
|
|
|
const URL_REGEX = new RegExp(
|
|
'^https?://docs.google.com/presentation/d/(.*)/pub(.*)$'
|
|
);
|
|
|
|
type Props = {
|
|
url: string,
|
|
};
|
|
|
|
export default class GoogleSlides extends React.Component<Props> {
|
|
static ENABLED = [URL_REGEX];
|
|
|
|
render() {
|
|
return (
|
|
<Frame
|
|
src={this.props.url.replace('/pub', '/embed')}
|
|
title="Google Slides Embed"
|
|
border
|
|
/>
|
|
);
|
|
}
|
|
}
|