Explorar o código

Update app.js, add clipboard util

Daniel Supernault %!s(int64=5) %!d(string=hai) anos
pai
achega
c271babda3
Modificáronse 1 ficheiros con 5 adicións e 1 borrados
  1. 5 1
      resources/assets/js/app.js

+ 5 - 1
resources/assets/js/app.js

@@ -153,6 +153,10 @@ window.App.util = {
 			let u = url + '/embed';
 			let u = url + '/embed';
 			return '<iframe src="'+u+'" class="pixelfed__embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script async defer src="'+window.location.origin +'/embed.js"><\/script>';
 			return '<iframe src="'+u+'" class="pixelfed__embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script async defer src="'+window.location.origin +'/embed.js"><\/script>';
 		})
 		})
-	}
+	},
+
+	clipboard: (function(data) {
+		return navigator.clipboard.writeText(data);
+	})
 
 
 };
 };