|
@@ -25,6 +25,13 @@ pixelfed.readmore = () => {
|
|
});
|
|
});
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+try {
|
|
|
|
+ document.createEvent("TouchEvent");
|
|
|
|
+ $('body').addClass('touch');
|
|
|
|
+} catch (e) {
|
|
|
|
+ return false;
|
|
|
|
+}
|
|
|
|
+
|
|
window.InfiniteScroll = require('infinite-scroll');
|
|
window.InfiniteScroll = require('infinite-scroll');
|
|
window.filesize = require('filesize');
|
|
window.filesize = require('filesize');
|
|
window.Plyr = require('plyr');
|
|
window.Plyr = require('plyr');
|
|
@@ -137,10 +144,10 @@ window.pixelfed.copyToClipboard = (str) => {
|
|
const el = document.createElement('textarea');
|
|
const el = document.createElement('textarea');
|
|
el.value = str;
|
|
el.value = str;
|
|
el.setAttribute('readonly', '');
|
|
el.setAttribute('readonly', '');
|
|
- el.style.position = 'absolute';
|
|
|
|
|
|
+ el.style.position = 'absolute';
|
|
el.style.left = '-9999px';
|
|
el.style.left = '-9999px';
|
|
document.body.appendChild(el);
|
|
document.body.appendChild(el);
|
|
- const selected =
|
|
|
|
|
|
+ const selected =
|
|
document.getSelection().rangeCount > 0
|
|
document.getSelection().rangeCount > 0
|
|
? document.getSelection().getRangeAt(0)
|
|
? document.getSelection().getRangeAt(0)
|
|
: false;
|
|
: false;
|
|
@@ -162,4 +169,4 @@ $(document).ready(function() {
|
|
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
|
|
const warningTitleCSS = 'color:red; font-size:60px; font-weight: bold; -webkit-text-stroke: 1px black;';
|
|
const warningDescCSS = 'font-size: 18px;';
|
|
const warningDescCSS = 'font-size: 18px;';
|
|
console.log('%cStop!', warningTitleCSS);
|
|
console.log('%cStop!', warningTitleCSS);
|
|
-console.log("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Pixelfed feature or \"hack\" someone's account, it is a scam and will give them access to your Pixelfed account.", warningDescCSS);
|
|
|
|
|
|
+console.log("%cThis is a browser feature intended for developers. If someone told you to copy and paste something here to enable a Pixelfed feature or \"hack\" someone's account, it is a scam and will give them access to your Pixelfed account.", warningDescCSS);
|