1
0
Fork 0

Remove "f" parameter / network page parameter cleanup

This commit is contained in:
Michael 2020-01-13 20:10:13 +00:00
commit b83f328983
11 changed files with 34 additions and 75 deletions

View file

@ -222,7 +222,7 @@ function string2bb(element) {
match: /(^|\s)(\#)([^ \n]{2,})$/,
index: 3,
search: function(term, callback) {
$.getJSON(baseurl + '/hashtag/' + '?f=&t=' + term)
$.getJSON(baseurl + '/hashtag/' + '?t=' + term)
.done(function(data) {
callback($.map(data, function(entry) {
// .toLowerCase() enables case-insensitive search
@ -275,7 +275,7 @@ function string2bb(element) {
tags = {
match: /(^|\s)(\#)([^ \n]{2,})$/,
index: 3,
search: function(term, callback) { $.getJSON(baseurl + '/hashtag/' + '?f=&t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
search: function(term, callback) { $.getJSON(baseurl + '/hashtag/' + '?t=' + term).done(function(data) { callback($.map(data, function(entry) { return entry.text.indexOf(term) === 0 ? entry : null; })); }); },
replace: function(item) { return "$1$2" + item.text; },
template: tag_format
};

View file

@ -498,7 +498,7 @@ function insertBBCodeInTextarea(BBCode, textarea) {
function NavUpdate() {
if (!stopped) {
var pingCmd = 'ping?format=json' + ((localUser != 0) ? '&f=&uid=' + localUser : '');
var pingCmd = 'ping?format=json' + ((localUser != 0) ? '&uid=' + localUser : '');
$.get(pingCmd, function(data) {
if (data.result) {
// send nav-update event
@ -980,7 +980,7 @@ Array.prototype.remove = function(item) {
function previewTheme(elm) {
theme = $(elm).val();
$.getJSON('pretheme?f=&theme=' + theme,function(data) {
$.getJSON('pretheme?theme=' + theme,function(data) {
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
});

View file

@ -127,7 +127,7 @@ function frio_item_photo_links(App $a, &$body_info)
function frio_item_photo_menu(App $a, &$arr)
{
foreach ($arr['menu'] as $k => $v) {
if (strpos($v, 'poke/?f=&c=') === 0 || strpos($v, 'message/new/') === 0) {
if (strpos($v, 'poke?c=') === 0 || strpos($v, 'message/new/') === 0) {
$v = 'javascript:addToModal(\'' . $v . '\'); return false;';
$arr['menu'][$k] = $v;
}
@ -181,7 +181,7 @@ function frio_contact_photo_menu(App $a, &$args)
// Add to pm and poke links a new key with the value 'modal'.
// Later we can make conditions in the corresponing templates (e.g.
// contact_template.tpl)
if (strpos($pokelink, 'poke/?f=&c=' . $cid) !== false) {
if (strpos($pokelink, 'poke?c=' . $cid) !== false) {
$args['menu']['poke'][3] = 'modal';
}