Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 #ifdef 0
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #endif
7 let gDragDataHelper = {
8 get mimeType() {
9 return "text/x-moz-url";
10 },
12 getLinkFromDragEvent: function DragDataHelper_getLinkFromDragEvent(aEvent) {
13 let dt = aEvent.dataTransfer;
14 if (!dt || !dt.types.contains(this.mimeType)) {
15 return null;
16 }
18 let data = dt.getData(this.mimeType) || "";
19 let [url, title] = data.split(/[\r\n]+/);
20 return {url: url, title: title};
21 }
22 };