Skip to content

Commit 4d82ece

Browse files
committed
Add functions to detect new gmail and upgrade-states.
This closes https://github.com/josteink/gmail.js/issues/4.
1 parent bbd0761 commit 4d82ece

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/gmail.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,14 @@ var Gmail = function(localJQuery) {
244244
return null;
245245
};
246246

247+
api.check.is_new_data_layer = function () {
248+
return GM_SPT_ENABLED === "true";
249+
};
250+
251+
api.check.is_new_gui = function () {
252+
return GM_RFT_ENABLED === "true";
253+
};
254+
247255
api.check.is_thread = function() {
248256
var check_1 = $(".nH .if").children(":eq(1)").children().children(":eq(1)").children();
249257
var check_2 = api.get.email_ids();

0 commit comments

Comments
 (0)