Compare commits
3 Commits
e4b6c81024
...
6070bde413
Author | SHA1 | Date | |
---|---|---|---|
6070bde413 | |||
c7a6d426f0 | |||
f66cf0f802 |
@ -1,5 +1,5 @@
|
||||
{
|
||||
"type": "tildefriends-app",
|
||||
"emoji": "🐌",
|
||||
"previous": "&zRv7YNZBT/NoliiTS7Jn/Q+3przdFZljUl8yPBIpSSE=.sha256"
|
||||
"previous": "&RGDjjNsX3jYJFpOcDyI+LH2qmscuY0q8gP4dyJjOtww=.sha256"
|
||||
}
|
||||
|
@ -291,6 +291,7 @@ class TfComposeElement extends LitElement {
|
||||
);
|
||||
}
|
||||
let tribute = new Tribute({
|
||||
iframe: this.shadowRoot,
|
||||
collection: [
|
||||
{
|
||||
values: values,
|
||||
@ -325,6 +326,7 @@ class TfComposeElement extends LitElement {
|
||||
let encrypt = this.renderRoot.getElementById('encrypt_to');
|
||||
if (encrypt) {
|
||||
let tribute = new Tribute({
|
||||
iframe: this.shadowRoot,
|
||||
values: Object.entries(this.users).map((x) => ({
|
||||
key: x[1].name,
|
||||
value: x[0],
|
||||
|
@ -483,8 +483,8 @@ class TributeRange {
|
||||
|
||||
getDocument() {
|
||||
let iframe;
|
||||
if (this.tribute.current.collection) {
|
||||
iframe = this.tribute.current.collection.iframe;
|
||||
if (this.tribute.current.collection[0].iframe) {
|
||||
iframe = this.tribute.current.collection[0].iframe;
|
||||
}
|
||||
|
||||
if (!iframe) {
|
||||
@ -653,8 +653,8 @@ class TributeRange {
|
||||
}
|
||||
|
||||
getWindowSelection() {
|
||||
if (this.tribute.collection.iframe) {
|
||||
return this.tribute.collection.iframe.contentWindow.getSelection()
|
||||
if (this.tribute.collection[0].iframe) {
|
||||
return this.tribute.collection[0].iframe.getSelection()
|
||||
}
|
||||
|
||||
return window.getSelection()
|
||||
|
22
core/core.js
22
core/core.js
@ -815,24 +815,6 @@ function setGlobalSettings(settings) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODOC
|
||||
* @param {*} data
|
||||
* @param {*} bytes
|
||||
* @returns
|
||||
*/
|
||||
function startsWithBytes(data, bytes) {
|
||||
if (data.byteLength >= bytes.length) {
|
||||
let dataBytes = new Uint8Array(data.slice(0, bytes.length));
|
||||
for (let i = 0; i < bytes.length; i++) {
|
||||
if (dataBytes[i] !== bytes[i] && bytes[i] !== null) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* TODOC
|
||||
* @param {*} response
|
||||
@ -1163,8 +1145,8 @@ async function blobHandler(request, response, blobId, uri) {
|
||||
}
|
||||
|
||||
let app_object = JSON.parse(utf8Decode(await getBlobOrContent(app_id)));
|
||||
id = app_object.files[uri.substring(1)];
|
||||
if (!id && app_object.files['handler.js']) {
|
||||
id = app_object?.files[uri.substring(1)];
|
||||
if (!id && app_object?.files['handler.js']) {
|
||||
let answer;
|
||||
try {
|
||||
answer = await useAppHandler(
|
||||
|
Loading…
Reference in New Issue
Block a user