Closed zeltak closed 7 years ago
Your could read the default mappings in settings, and figure it out by yourself without much effort.
function openLinkInCurrentTab(url) {
RUNTIME("openLink", {
tab: {
tabbed: false
},
url: url
});
}
openLinkInCurrentTab("https://github.com/");
hmm sorry again for being a pain but i really cant get it to work :) i apologize in advance for my pathetic coding skills and really appreciate your help :)
i currently have this setup (which you helped me with greatly) which works great :+1:
/// quicklinks new tab
var favorites = function(prefix, urls) {
for (var key in urls) {
mapkey(
prefix + key,
'favorite:' + urls[key],
"tabOpenLink('" + urls[key] + "')"
)
}
}
favorites('gn', {
0: 'http://10.0.0.2:9091/transmission/web/',
1: 'https://mail.google.com/',
2: 'http://www.google.com/calendar',
3: 'https://www.google.com/contacts/#contacts',
4: 'https://ttrss.server-speed.net/#f=-3am',
})
i wanted to have an additional key to open in current tab instead of new tab. i thought this should do it
/// quicklinks new tab
var favorites2 = function(prefix, urls) {
for (var key in urls) {
mapkey(
prefix + key,
'favorite:' + urls[key],
""openLinkInCurrentTab('" + urls[key] + "')"
)
}
}
favorites2('go', {
0: 'http://10.0.0.2:9091/transmission/web/',
1: 'https://mail.google.com/',
2: 'http://www.google.com/calendar',
3: 'https://www.google.com/contacts/#contacts',
4: 'https://ttrss.server-speed.net/#f=-3am',
})
but that dosent really seem to work. if you can be bothered ill understand :D but would be great to get it to work. i can also add it to a wiki if you want
best
Z
Full code is here.
BTW, you could not use go
, as it is already use in default mappings.
function openLinkInCurrentTab(url) {
RUNTIME("openLink", {
tab: {
tabbed: false
},
url: url
});
}
var favorites2 = function(prefix, urls) {
for (var key in urls) {
mapkey(
prefix + key,
'favorite:' + urls[key],
"openLinkInCurrentTab('" + urls[key] + "')"
)
}
}
favorites2('gj', {
0: 'http://10.0.0.2:9091/transmission/web/',
1: 'https://mail.google.com/',
2: 'http://www.google.com/calendar',
3: 'https://www.google.com/contacts/#contacts',
4: 'https://ttrss.server-speed.net/#f=-3am',
})
thx so much again, for the life of me i cant get it to work
here attached is my current config
thx again so much, really appreciated
Z
Hi im looking to open a link in the current tab and not new tab (tabOpenLink)
i want to change this line
top open in the current tab
best
Z