Gmail对话视图切换bookmarketlet / favelet /" scriptlet" [英] Gmail conversation view toggle bookmarketlet / favelet / "scriptlet"

查看:153
本文介绍了Gmail对话视图切换bookmarketlet / favelet /" scriptlet"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到,如果我有一个打开/关闭对话视图的gmail选项卡,然后打开另一个选项卡并更改对话视图设置,则我的原始选项卡将保持其开始的对话视图状态,例如在执行新操作时搜索等,新标签使用我刚刚更改的设置。



这让我认为可能会有一些JavaScript bookmarklet / favelet /scriptlet轻松让我们暂时更改给定gmail选项卡的设置,而无需进入设置。



有谁知道这个已存在或者是否有人能够创建它?我的想法是捕获一个gmail的负载与它关闭,做一个差异/ winmerge的两个看看有什么不同,并从那里,但我希望有人已经创建它=)。 p>

解决方案

我会查看gmail js并制作书签:P



<编辑:似乎js被混淆了很多,从原来的js复制功能会很难...



我会检查html更改是什么这两个视图之间,并写一个js函数我自己应用这些变化。



我去了,而是有点不同,我写了一些js,



我做了一个可以拖动到书签栏的链接的jsfiddle:



https://jsfiddle.net/seahorsepip/j5exk7nw/



小书签代码:

  javascript:
window.location.hash ='settings /一般';
a =()=> document.querySelector('tbody tr:nth-​​child(8)input:not(:checked)');
b = setInterval(()=> {
if(a()!= null){
clearInterval(b);
a()。click();
)document.querySelector('[guidedhelpid = save_changes_button]')。click();
}
},5);

编辑:更新后的代码可以再次使用。


I noticed that if I have a gmail tab open with conversation view on/off, and then I open another tab and change the conversation view setting, my original tab stays in the conversation view state it started in such as when doing new searches etc. and the new tab uses the setting I just changed it to.

This led me to think there might be some JavaScript bookmarklet / favelet / "scriptlet" that could easily let us change the setting for a given gmail tab temporarily without having to go into the settings.

Does anyone know of this already in existence or is anyone able to create it? My thought would be to capture a load of gmail with it on and with it off and do a diff / winmerge on the two to see what's different and take it from there, but I'm hoping someone's already created it =).

解决方案

I'll look into the gmail js and make a bookmarklet :P

Edit: seems the js is obfuscated A lot, copying the function from the original js is gonna be hard...

I'll check what the html changes are between both views and write a js function myself to apply those changes.

I went and instead made it a bit different, I wrote some js that does actually the thing that you would do yourself(it simulates going to settings and changing them).

I made a jsfiddle with a link that can be dragged into the bookmarks bar:

https://jsfiddle.net/seahorsepip/j5exk7nw/

The bookmarklet code:

javascript:
window.location.hash = 'settings/general';
a = () => document.querySelector('tbody tr:nth-child(8) input:not(:checked)');
b = setInterval(() => {
    if(a() != null) {
        clearInterval(b);
        a().click();
        document.querySelector('[guidedhelpid=save_changes_button]').click();
    }
}, 5);

Edit: updated code to work again.

这篇关于Gmail对话视图切换bookmarketlet / favelet /&quot; scriptlet&quot;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆