Removed inapproriately used fromEventPattern factories

This commit is contained in:
squidfunk 2020-09-27 17:27:14 +02:00
parent d45c378d60
commit 7820d85949
11 changed files with 19 additions and 21 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,8 +1,8 @@
{ {
"assets/javascripts/bundle.js": "assets/javascripts/bundle.a80af9f7.min.js", "assets/javascripts/bundle.js": "assets/javascripts/bundle.db3416d7.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.a80af9f7.min.js.map", "assets/javascripts/bundle.js.map": "assets/javascripts/bundle.db3416d7.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.26b6ac05.min.js", "assets/javascripts/vendor.js": "assets/javascripts/vendor.91be5808.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.26b6ac05.min.js.map", "assets/javascripts/vendor.js.map": "assets/javascripts/vendor.91be5808.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.cbc634e2.min.js", "assets/javascripts/worker/search.js": "assets/javascripts/worker/search.cbc634e2.min.js",
"assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.cbc634e2.min.js.map", "assets/javascripts/worker/search.js.map": "assets/javascripts/worker/search.cbc634e2.min.js.map",
"assets/stylesheets/main.css": "assets/stylesheets/main.f6c1319f.min.css", "assets/stylesheets/main.css": "assets/stylesheets/main.f6c1319f.min.css",

View File

@ -172,8 +172,8 @@
{% endblock %} {% endblock %}
</div> </div>
{% block scripts %} {% block scripts %}
<script src="{{ 'assets/javascripts/vendor.26b6ac05.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/vendor.91be5808.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.a80af9f7.min.js' | url }}"></script> <script src="{{ 'assets/javascripts/bundle.db3416d7.min.js' | url }}"></script>
{%- set translations = {} -%} {%- set translations = {} -%}
{%- for key in [ {%- for key in [
"clipboard.copy", "clipboard.copy",

View File

@ -20,7 +20,7 @@
* IN THE SOFTWARE. * IN THE SOFTWARE.
*/ */
import { Observable, Subject, fromEventPattern } from "rxjs" import { Observable, Subject, fromEvent } from "rxjs"
import { import {
pluck, pluck,
share, share,
@ -88,9 +88,7 @@ export function watchWorker<T extends WorkerMessage>(
): Observable<T> { ): Observable<T> {
/* Intercept messages from worker-like objects */ /* Intercept messages from worker-like objects */
const rx$ = fromEventPattern<MessageEvent>(next => const rx$ = fromEvent<MessageEvent>(worker, "message")
worker.addEventListener("message", next)
)
.pipe<T>( .pipe<T>(
pluck("data") pluck("data")
) )

View File

@ -21,7 +21,7 @@
*/ */
import * as ClipboardJS from "clipboard" import * as ClipboardJS from "clipboard"
import { NEVER, Observable, Subject, fromEventPattern } from "rxjs" import { NEVER, Observable, Subject } from "rxjs"
import { mapTo, share, tap } from "rxjs/operators" import { mapTo, share, tap } from "rxjs/operators"
import { getElements } from "browser" import { getElements } from "browser"
@ -71,8 +71,8 @@ export function setupClipboard(
}) })
/* Initialize clipboard */ /* Initialize clipboard */
const clipboard$ = fromEventPattern<ClipboardJS.Event>(next => { const clipboard$ = new Observable<ClipboardJS.Event>(subscriber => {
new ClipboardJS(".md-clipboard").on("success", next) new ClipboardJS(".md-clipboard").on("success", ev => subscriber.next(ev))
}) })
.pipe( .pipe(
share() share()