This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ | |
const result = [...document.querySelectorAll('.text-bolt-elements-textSecondary + div > div > ._MarkdownContent_1mdbx_1')] | |
.map(node => node.innerText) | |
.reduce((acc, curr) => acc + curr + '\n\n', ''); | |
navigator.clipboard.writeText(result) | |
.then(() => alert('Content copied to clipboard!')) | |
.catch(err => alert('Failed to copy: ' + err)); | |
})(); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Notes: | |
- This might change A LOT — remember to commit your current TutorialKit state before using this script. | |
- To run it, put the file in your `src/content/tutorial` folder and from there run `node sluggify.js` | |
*/ | |
import { promises as fs } from 'fs'; | |
import path from 'path'; | |
import { fileURLToPath } from 'url'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
files: { | |
src: { | |
name: 'src', | |
type: 'folder', | |
contents: '', | |
fullPath: 'src', | |
lastModified: 1525387210297 | |
}, | |
'src/app': { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.devtoolsFormatters = [{ | |
header: function(obj){ | |
if (!obj.__clown) { | |
return null; | |
} | |
delete obj.__clown; | |
const style = ` | |
color: red; | |
border: dotted 2px gray; | |
border-radius: 4px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Directive, ElementRef, Input, OnChanges } from '@angular/core'; | |
/** | |
* Usage: | |
* <mycomponent [dtTheme]="{'color-main': '#bada55'}"></mycomponent> | |
*/ | |
@Directive({ | |
selector: '[dtTheme]' | |
}) | |
export class ThemeDirective implements OnChanges { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'zone.js/dist/zone'; | |
import '@webcomponents/custom-elements/src/native-shim'; | |
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | |
import { ButtonModule } from './button.module'; | |
platformBrowserDynamic().bootstrapModule(ButtonModule); |
NewerOlder