Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let dataPostListBlogCurrent= [
- {
- "text":"Cara Redirect URL atau Alamat Blog yang Telah Migrasi",
- "url":"https://footstepofthedragon.blogspot.com/2025/09/cara-redirect-url-atau-alamat-blog-yang-telah-migrasi-ke-blog-lain.html"
- },
- {
- "text":"Cara Advance Redirect untuk Blog yang Telah Migrasi dengan Menggunkaan JavaScript",
- "url":"https://footstepofthedragon.blogspot.com/2025/09/cara-advance-redirect-untuk-blog-yang-telah-migrasi-dengan-menggunkaan-javascript.html"
- },
- ]; // list url post blog current
- let dataPostListBlogTarget = [
- {
- "text":"Cara Redirect URL atau Alamat Blog yang Telah Migrasi",
- "url":"https://langittutorial.com/cara-redirect-url-atau-alamat-blog-yang-telah-migrasi/"
- },
- {
- "text":"Cara Advance Redirect untuk Blog yang Telah Migrasi dengan Menggunkaan JavaScript",
- "url":"https://langittutorial.com/cara-advance-redirect-untuk-blog-yang-telah-migrasi-dengan-menggunkaan-javascript/"
- },
- ]; // list url post blog target
- let urlBlogTarget = 'https://langittutorial.com';
- function hardcoreRedirect(){
- let indexBlogCurrent = dataPostListBlogCurrent.findIndex(row => row.url == window.location.href);
- console.log(indexBlogCurrent);
- if (indexBlogCurrent != -1) {
- let indexBlogTarget = dataPostListBlogTarget.findIndex(item => item.text == dataPostListBlogCurrent[indexBlogCurrent].text);
- if (indexBlogTarget != -1) {
- let urlRedirectBlogTarget = dataPostListBlogTarget[indexBlogTarget].url;
- window.location.assign(urlRedirectBlogTarget );
- }else{
- window.location.assign(urlBlogTarget);
- }
- }else{
- let urlBlogCurrent = window.location.href;
- let urlRedirectBlogTarget = urlBlogCurrent.replace('footstepofdragon.blogspot.com', 'langittutorial.com');
- window.location.assign(urlRedirectBlogTarget);
- }
- }
- hardcoreRedirect()
Advertisement
Add Comment
Please, Sign In to add comment