Facebook (Insert View Post Button)

Inserts a View Post button when browsing photos on Facebook — e.g. Navigates away from the standard theater view

24.06.2021 itibariyledir. En son verisyonu görün.

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name     Facebook (Insert View Post Button)
// @match    https://www.facebook.com/*
// @match    http://www.facebook.com/*
// @icon     https://www.google.com/s2/favicons?domain=facebook.com
// @run-at   document-start
// @grant    GM_addStyle
// @author   JZersche (Free Release)
// @version 1.00
// @namespace https://greasyfork.org/users/95175
// @description Inserts a View Post button when browsing photos on Facebook — e.g. Navigates away from the standard theater view
// ==/UserScript==

setTimeout(function() {

if(window.location.href.match(/(facebook\.com\/photo\/\?fbid\=\d+\&set\=a\.\d+|facebook\.com\/\S+\/photos\/a\.\d+\/\d+)/)) {

try{

let Facebook_username = document.getElementsByClassName('oajrlxb2 g5ia77u1 qu0x051f esr5mh6w e9989ue4 r7d6kgcz rq0escxv nhd2j8a9 nc684nl6 p7hjln8o kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x jb3vyjys rz4wbd8a qt6c0cv9 a8nywdso i1ao9s8h esuyzwwr f1sip0of lzcic4wl oo9gr5id gpro0wi8 lrazzd5p')[0].href.match(/com\/\S+\?/)[0].match(/\/\S+/)[0].replace('/','').replace('?','');

try{let postID = window.location.href.match(/\?fbid\=\d+/)[0].match(/\d+/)[0];}catch(e){}
try{let postID2 = window.location.href.match(/facebook\.com\S+\/photos\/a\.\d+\/\d+/)[0].match(/\d+/g)[1];

if(Facebook_username == 'profile.php') {
Facebook_username = postID2};
console.log(Facebook_username);
}catch(e){}

try{let setID = window.location.href.match(/(&set\=a\.\d+)/)[0].match(/\d+/)[0];}catch(e){}
try{let setID2 = window.location.href.match(/(a\.\d+)/)[0];}catch(e){}

try{let EditButton = document.getElementsByClassName('rq0escxv l9j0dhe7 du4w35lb j83agx80 pfnyh3mw taijpn5t bp9cbjyn owycx6da btwxx1t3 kt9q3ron ak7q8e6j isp2s0ed ri5dt5u2 rt8b4zig n8ej3o3l agehan2d sk4xxmp2 d1544ag0 tw6a2znq tdjehn4e tv7at329')[0];

if(EditButton) {
EditButton.insertAdjacentHTML('afterend','<div class="'+EditButton.className+' viewpost" style="font-family: inherit; font-weight:600; font-size:14px; color:#fff!important"><a href="#">View Post</a></div>');
document.getElementsByClassName('viewpost')[0];
}
}catch(e){}

try{
let ViewPostButton = document.getElementsByClassName('a8nywdso j7796vcc rz4wbd8a l29c1vbm')[0];
if(ViewPostButton) {


try{
if(window.location.href.match(/facebook\.com\/\D+/)[0]){
ViewPostButton.insertAdjacentHTML('afterend','<div class="viewpost" style="font-family: inherit; font-weight:600; font-size:14px; color:#fff!important"><a href="http://www.facebook.com/'+window.location.href.match(/facebook\.com\/\S+\/photos/)[0].replace('facebook.com/','').replace('/photos','')+'/posts/'+window.location.href.match(/facebook\.com\S+\/photos\/a\.\d+\/\d+/)[0].match(/\d+/g)[1]+'">View Post</a></div>');
console.log('a');
}
}catch(e){}

try{
if(window.location.href.match(/facebook\.com\/\d+/)[0]) {
ViewPostButton.insertAdjacentHTML('afterend','<div class="viewpost" style="font-family: inherit; font-weight:600; font-size:14px; color:#fff!important"><a href="http://www.facebook.com/'+window.location.href.match(/facebook\.com\/\S+\/photos/)[0].replace('facebook.com/','').replace('/photos','')+'/posts/'+window.location.href.match(/facebook\.com\S+\/photos\/a\.\d+\/\d+/)[0].match(/\d+/g)[2]+'">View Post</a></div>');
console.log('b');
}
}catch(e){}

}


}catch(e){}

}

catch(e){}


}

},5000);