如何在Google云端硬盘中隐藏标题和选项栏

编程入门 行业动态 更新时间:2024-10-28 02:27:08
本文介绍了如何在Google云端硬盘中隐藏标题和选项栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想在Google驱动器中隐藏顶部的选项栏.我该如何实现?我正在使用cordova inAppBrowser打开此链接.

I want to hide the top options bar in google drive. How can I achieve that? I am using cordova inAppBrowser to open this link.

drive.google/file/d/0B_nipvep1WpPd2JXeDdJcUlNYXM/view

我想使用embedded=true,但是我不知道它如何工作.请参见下图.

I want to use embedded=true but I don't know how it would work. Please see the image below.

推荐答案

可能会帮助您

您必须等到inAppBrowser页面加载完成.

You have to wait until your inAppBrowser page loading finishes.

//Set css in your inAppstyle.css .drive-viewer-toolstrip{ display: none !important; opacity: 0 !important; }

您必须添加一个事件侦听器:

You must add an event listener:

var inApp = window.open('drive.google/file/d/0B_nipvep1WpPd2JXeDdJcUlNYXM/view', '_blank', 'location=no'); inApp.addEventListener('loadstop', function(){ inApp.insertCSS({ file: 'inAppStyle.css' },onSuccess); });

将此路径用于您的android项目文件:///android_asset/{您的文件夹}

Use this path for your android projects file:///android_asset/{your folder}

信息: github/apache/cordova-plugin-file/blob/master/doc/index.md#android-file-system-layout

您的JS

text += '<a href="javascript:void(0)" class="embedURL" onClick="cordova.InAppBrowser.open(\'drive.google/file/d‌​/0B_nipvep1WpPd2JXeD‌​dJcUlNYXM/view\', \'_blank\', \'location=no\')">' + data.docs[i].doc_title + '</a>';

更新了JS

text += '<a href="javascript:void(0)" class="embedURL" onClick="openthislink(\'drive.google/file/d‌​/0B_nipvep1WpPd2JXeD‌​dJcUlNYXM/view\')">' + data.docs[i].doc_title + '</a>'; //Create new function function openthislink(ln) { var inApp = window.open(ln, '_blank', 'location=no'); inApp.addEventListener('loadstop', function(){ inApp.insertCSS({ file: 'inAppStyle.css' },onSuccess); }); }

更多推荐

如何在Google云端硬盘中隐藏标题和选项栏

本文发布于:2023-10-09 16:58:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1476257.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:云端   盘中   选项   标题   如何在

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!