
Security News
Suno Breached via Shai-Hulud Worm, Leaked Code Exposes AI Music Scraping
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.
lofter-navigate
Advanced tools
目前LOFTER APP内支持使用scheme唤起新WebView打开指定的H5 url,该功能带来的浏览体验比使用`location.href`跳转要好(页面滚动位置的保留、手势支持、过场动画等),所以在端内页面的跳转推荐优先使用scheme方案。 同时,需要与客户端约定能够同时打开WebView的最大个数,以防占用过大内存或者性能造成APP崩溃、卡顿等问题。
目前LOFTER APP内支持使用scheme唤起新WebView打开指定的H5 url,该功能带来的浏览体验比使用location.href跳转要好(页面滚动位置的保留、手势支持、过场动画等),所以在端内页面的跳转推荐优先使用scheme方案。
同时,需要与客户端约定能够同时打开WebView的最大个数,以防占用过大内存或者性能造成APP崩溃、卡顿等问题。
location.href跳转新url,在支持该协议的App端内使用Scheme触发新WebView打开location.href的方式进行跳转,防止出现预期之外的WebView页面栈丢失import {
go,
close,
openWithLocation,
openWithWebview,
} from 'lofter-navigate'
go('https://www.lofter.com')
<button id="control" style="display: block; margin: 20px 0">带有页面栈数量控制的跳转按钮</button>
<script src="https://lofter.lf127.net/1658719740509/lofternavigate.umd.production.min.js"></script>
<script>
$('#control').on('click', function(e) {
e.preventDefault();
const url = location.href + '?t=' + new Date.getTime();
window.lofterNavigate.go(url);
})
</script>
close、openWithLocation、openWithWebview方法,但是要自行控制好页面栈数量和使用时机。maxCount,正整数类型,表示当前最大允许打开的WebView数量,默认不传时为10openWithWebview可以传递第二个参数params,不传默认为{inside: true},如果需要在7.5.6版本打开透明WebView,可以传{inside: true, opacity: true},如果需要添加webview 背景颜色,不带#的色值,可以传{inside: true, opacity: true, bgColor: '213213'}FAQs
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A Shai-Hulud infection exposed Suno's source code, which shows the AI music startup stream-ripped tracks to train its models.

Security News
Vercel is formalizing a monthly release program for Next.js. The change follows React2Shell and a sharp rise in AI-assisted vulnerability discovery.

Research
/Security News
11 malicious NuGet tools pose as game cheats to deploy Windows payloads, track hosts, and use Google Sheets for telemetry and control.