Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
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 };