summaryrefslogtreecommitdiff
path: root/ext/fg
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2016-07-06 19:56:13 -0700
committerAlex Yatskov <alex@foosoft.net>2016-07-06 19:56:13 -0700
commitabb3d741422ac456546dc7d2995f0915998fde4e (patch)
treecd892d1db0354df728bafab6c49ae3cbc50d8bc4 /ext/fg
parent80d2eac33cf00a8b13afb84d9d242029db97c75b (diff)
Temporarily removing gecko code from master until everything works in
firefox branch. This reverts commit 30585892b812dbf19c15bd010d6032fffa204c0d, reversing changes made to bd89db4ec5a55e7b08b27a3d736a32e859084aff.
Diffstat (limited to 'ext/fg')
-rw-r--r--ext/fg/js/popup.js7
-rw-r--r--ext/fg/js/range.js13
2 files changed, 2 insertions, 18 deletions
diff --git a/ext/fg/js/popup.js b/ext/fg/js/popup.js
index 4c2b18f7..4ec34249 100644
--- a/ext/fg/js/popup.js
+++ b/ext/fg/js/popup.js
@@ -58,12 +58,9 @@ class Popup {
}
setContent(content) {
- if (this.popup === null) {
- return;
+ if (this.popup !== null) {
+ this.popup.srcdoc = content;
}
-
- const doc = this.popup;
- doc.srcdoc=content;
}
sendMessage(action, params, callback) {
diff --git a/ext/fg/js/range.js b/ext/fg/js/range.js
index 0befe279..182e242c 100644
--- a/ext/fg/js/range.js
+++ b/ext/fg/js/range.js
@@ -16,19 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Polyfill caretRangeFromPoint() using the newer caretPositionFromPoint()
-if (!document.caretRangeFromPoint){
- document.caretRangeFromPoint = function polyfillcaretRangeFromPoint(x,y){
- let range = document.createRange();
- let position = document.caretPositionFromPoint(x,y);
- if (!position) {
- return null;
- }
- range.setStart(position.offsetNode, position.offset);
- range.setEnd(position.offsetNode, position.offset);
- return range;
- };
-}
class Range {
constructor(range) {