تعلم كيف تزيد  زوار موقعك وتقويه السيو - ميديا الخليج

تعلم كيف تزيد زوار موقعك وتقويه السيو

, by Ayman Kaddoura, 1 min reading time

اعزائي , اقدم لكم موقع رائع لزياده عدد زوارك وايضا الحصول على بعض الترافيك لزياده فرص ظهور موقعك في محرك
البحث قوقل
الموقع يوجد فيه محتوى مفيد جدا ويمكنكم زيارته من خلال الرابط التالي
https://growtraffic.com
في حال الدعم يمكتكم التواصل معنا وسوف نقوم بمساعدتك لتصفح الموقع
فريق عمل انستقرامي

 

Leave a comment

Leave a comment

  • Share on:
  • (function() { 'use strict'; var PRODUCT_CONFIG = { 'instagram-english-likes': { minPerPost: 50, label: 'لايك' }, 'instagram-real-likes': { minPerPost: 50, label: 'لايك' }, 'insta-video-views': { minPerPost: 100, label: 'مشاهدة' }, 'ig-video-share': { minPerPost: 10, label: 'شير' } }; var API_BASE = 'https://abshrboost.com'; var INITIAL_POSTS = 6; var LOAD_MORE_COUNT = 3; var currentPath = window.location.pathname; var currentProduct = null; for (var handle in PRODUCT_CONFIG) { if (currentPath.includes('/products/' + handle)) { currentProduct = { handle: handle, minPerPost: PRODUCT_CONFIG[handle].minPerPost, label: PRODUCT_CONFIG[handle].label }; break; } } if (!currentProduct) return; var allPosts = []; var visibleCount = INITIAL_POSTS; var selectedPosts = []; var directLink = ''; function arabicToWestern(str) { var arabicNumerals = ['٠','١','٢','٣','٤','٥','٦','٧','٨','٩']; var result = str; for (var i = 0; i < 10; i++) { result = result.replace(new RegExp(arabicNumerals[i], 'g'), i.toString()); } return result; } function getSelectedQuantity() { var selectors = [ 'select[name="id"]', '.product__variants select', 'select.single-option-selector', 'select#single-option-selector-0', '.product-form__option select', '.product-select', '[data-option-selector]', '.variant-selector select' ]; for (var i = 0; i < selectors.length; i++) { var el = document.querySelector(selectors[i]); if (el && el.selectedOptions && el.selectedOptions[0]) { var text = el.selectedOptions[0].text || el.selectedOptions[0].value || ''; var westernText = arabicToWestern(text); var match = westernText.match(/(\d+)/); if (match) return parseInt(match[1], 10); } } return 0; } function interceptAjaxCart() { var originalFetch = window.fetch; window.fetch = function(url, options) { if (url && (url.includes('/cart/add') || url.includes('/cart/add.js'))) { if (window.__igWidgetData && options) { try { if (options.body instanceof FormData) { options.body.set('properties[selected_posts]', window.__igWidgetData.selected_posts); options.body.set('properties[total_quantity]', window.__igWidgetData.total_quantity); options.body.set('properties[per_post]', window.__igWidgetData.per_post); } else if (typeof options.body === 'string') { var body = JSON.parse(options.body); if (!body.properties) body.properties = {}; body.properties.selected_posts = window.__igWidgetData.selected_posts; body.properties.total_quantity = window.__igWidgetData.total_quantity; body.properties.per_post = window.__igWidgetData.per_post; options.body = JSON.stringify(body); } else if (options.body && typeof options.body === 'object') { if (!options.body.properties) options.body.properties = {}; options.body.properties.selected_posts = window.__igWidgetData.selected_posts; options.body.properties.total_quantity = window.__igWidgetData.total_quantity; options.body.properties.per_post = window.__igWidgetData.per_post; } } catch (e) { console.log('IG Widget: Could not modify fetch body', e); } } } return originalFetch.apply(this, arguments); }; var originalXHROpen = XMLHttpRequest.prototype.open; var originalXHRSend = XMLHttpRequest.prototype.send; XMLHttpRequest.prototype.open = function(method, url) { this._url = url; return originalXHROpen.apply(this, arguments); }; XMLHttpRequest.prototype.send = function(body) { if (this._url && (this._url.includes('/cart/add') || this._url.includes('/cart/add.js'))) { if (window.__igWidgetData) { try { if (body instanceof FormData) { body.set('properties[selected_posts]', window.__igWidgetData.selected_posts); body.set('properties[total_quantity]', window.__igWidgetData.total_quantity); body.set('properties[per_post]', window.__igWidgetData.per_post); } else if (typeof body === 'string') { var parsed = JSON.parse(body); if (!parsed.properties) parsed.properties = {}; parsed.properties.selected_posts = window.__igWidgetData.selected_posts; parsed.properties.total_quantity = window.__igWidgetData.total_quantity; parsed.properties.per_post = window.__igWidgetData.per_post; body = JSON.stringify(parsed); } } catch (e) { console.log('IG Widget: Could not modify XHR body', e); } } } return originalXHRSend.call(this, body); }; if (window.jQuery) { var originalAjax = jQuery.ajax; jQuery.ajax = function(settings) { if (settings && settings.url && (settings.url.includes('/cart/add') || settings.url.includes('/cart/add.js'))) { if (window.__igWidgetData) { if (typeof settings.data === 'string') { try { var data = JSON.parse(settings.data); if (!data.properties) data.properties = {}; data.properties.selected_posts = window.__igWidgetData.selected_posts; data.properties.total_quantity = window.__igWidgetData.total_quantity; data.properties.per_post = window.__igWidgetData.per_post; settings.data = JSON.stringify(data); } catch (e) {} } else if (settings.data && typeof settings.data === 'object') { if (!settings.data.properties) settings.data.properties = {}; settings.data.properties.selected_posts = window.__igWidgetData.selected_posts; settings.data.properties.total_quantity = window.__igWidgetData.total_quantity; settings.data.properties.per_post = window.__igWidgetData.per_post; } } } return originalAjax.apply(this, arguments); }; } } function createWidget() { var form = document.querySelector('form[action*="/cart/add"]'); if (!form) { form = document.querySelector('form[data-product-form], .product-form form, form.product-form'); } if (!form) return; var selectedPostsInput = document.createElement('input'); selectedPostsInput.type = 'hidden'; selectedPostsInput.name = 'properties[selected_posts]'; selectedPostsInput.id = 'ig-selected-posts-input'; selectedPostsInput.value = ''; form.appendChild(selectedPostsInput); var quantityInput = document.createElement('input'); quantityInput.type = 'hidden'; quantityInput.name = 'properties[total_quantity]'; quantityInput.id = 'ig-quantity-input'; quantityInput.value = ''; form.appendChild(quantityInput); var perPostInput = document.createElement('input'); perPostInput.type = 'hidden'; perPostInput.name = 'properties[per_post]'; perPostInput.id = 'ig-per-post-input'; perPostInput.value = ''; form.appendChild(perPostInput); interceptAjaxCart(); var container = document.createElement('div'); container.innerHTML = '\
    \ \ \

    \ \ \ \ \ \ \ \ \ \ \ \ \ اختر طريقة الإرسال\

    \ \
    \
    🔗 رابط مباشر
    \
    يمكنك إضافة رابط المنشور مباشرة
    \ \
    ✓ تم إضافة الرابط - يمكنك الآن الإضافة للسلة
    \
    \ \
    أو
    \ \ \ \
    \
    أدخل اسم المستخدم واختر المنشورات لتوزيع ال' + currentProduct.label + ' عليها
    \
    \ \ \
    \
    جاري تحميل المنشورات...
    \
    \
    \ \
    \ تم اختيار: 0 من أصل 0 منشور\ \
    \
    وصلت للحد الأقصى من المنشورات المسموحة
    \
    ✓ تم اختيار المنشورات - يمكنك الآن الإضافة للسلة
    \
    \ \
    '; var insertPoint = document.querySelector('.product__variants, .product-form__options, .product-form__variants, .product-info__variants'); if (insertPoint) { insertPoint.parentNode.insertBefore(container, insertPoint.nextSibling); } else { form.parentNode.insertBefore(container, form.nextSibling); } var expandBtn = document.getElementById('ig-expand-btn'); var selectSection = document.getElementById('ig-select-section'); expandBtn.addEventListener('click', function() { var isOpen = selectSection.classList.contains('open'); if (isOpen) { selectSection.classList.remove('open'); expandBtn.classList.remove('active'); } else { selectSection.classList.add('open'); expandBtn.classList.add('active'); if (allPosts.length > 0 || selectedPosts.length > 0) { document.getElementById('ig-direct-section').style.opacity = '0.5'; document.getElementById('ig-direct-section').style.pointerEvents = 'none'; } } }); var directLinkInput = document.getElementById('ig-direct-link'); directLinkInput.addEventListener('input', handleDirectLinkChange); directLinkInput.addEventListener('change', handleDirectLinkChange); function handleDirectLinkChange() { var link = directLinkInput.value.trim(); var urlMatch = link.match(/(https?:\/\/[^\s]+)/); if (urlMatch) { link = urlMatch[1]; directLinkInput.value = link; } var directSection = document.getElementById('ig-direct-section'); var directSuccess = document.getElementById('ig-direct-success'); if (link.length > 0 && link.includes('instagram.com')) { directLink = link; directSection.classList.add('active'); expandBtn.style.opacity = '0.5'; expandBtn.style.pointerEvents = 'none'; selectSection.classList.remove('open'); expandBtn.classList.remove('active'); directSuccess.style.display = 'block'; selectedPosts = []; updateInputs(); document.getElementById('ig-selected-posts-input').value = link; var qty = getSelectedQuantity(); document.getElementById('ig-quantity-input').value = qty.toString(); document.getElementById('ig-per-post-input').value = qty.toString(); window.__igWidgetData = { selected_posts: link, total_quantity: qty.toString(), per_post: qty.toString() }; } else { directLink = ''; directSection.classList.remove('active'); expandBtn.style.opacity = '1'; expandBtn.style.pointerEvents = 'auto'; directSuccess.style.display = 'none'; if (selectedPosts.length === 0) { document.getElementById('ig-selected-posts-input').value = ''; document.getElementById('ig-quantity-input').value = ''; document.getElementById('ig-per-post-input').value = ''; window.__igWidgetData = null; } } } function updateMaxPosts() { var qty = getSelectedQuantity(); var maxPosts = qty > 0 ? Math.floor(qty / currentProduct.minPerPost) : 0; document.getElementById('ig-max-posts').textContent = maxPosts; return maxPosts; } updateMaxPosts(); var variantSelect = document.querySelector('select[name="id"], .product__variants select, select.single-option-selector, .product-form__option select'); if (variantSelect) { variantSelect.addEventListener('change', function() { updateMaxPosts(); if (allPosts.length > 0) renderPosts(); updateInputs(); handleDirectLinkChange(); }); } var addToCartBtn = document.querySelector('button[type="submit"], .product__add-to-cart, button[name="add"], .product-form__submit'); if (addToCartBtn) { addToCartBtn.addEventListener('click', function(e) { var hasDirectLink = directLink.length > 0 && directLink.includes('instagram.com'); var hasSelectedPosts = selectedPosts.length > 0; if (!hasDirectLink && !hasSelectedPosts) { e.preventDefault(); e.stopPropagation(); alert('يرجى إضافة رابط المنشور أو اختيار منشورات من الأداة أولاً'); var widget = document.getElementById('instagram-post-selector'); if (widget) { widget.scrollIntoView({ behavior: 'smooth', block: 'center' }); widget.style.boxShadow = '0 0 20px rgba(225,48,108,0.5)'; setTimeout(function() { widget.style.boxShadow = 'none'; }, 2000); } return false; } }, true); } document.getElementById('ig-load-btn').addEventListener('click', loadPosts); document.getElementById('ig-load-more').addEventListener('click', function() { visibleCount += LOAD_MORE_COUNT; renderPosts(); }); document.getElementById('ig-cancel-btn').addEventListener('click', function() { allPosts = []; selectedPosts = []; visibleCount = INITIAL_POSTS; document.getElementById('ig-input-section').style.display = 'block'; document.getElementById('ig-grid').style.display = 'none'; document.getElementById('ig-grid').innerHTML = ''; document.getElementById('ig-selection-info').style.display = 'none'; document.getElementById('ig-warning').style.display = 'none'; document.getElementById('ig-load-more').style.display = 'none'; document.getElementById('ig-select-success').style.display = 'none'; document.getElementById('ig-username').value = ''; document.getElementById('ig-note-text').textContent = 'أدخل اسم المستخدم واختر المنشورات لتوزيع ال' + currentProduct.label + ' عليها'; document.getElementById('ig-cancel-btn').style.display = 'none'; document.getElementById('ig-direct-section').style.opacity = '1'; document.getElementById('ig-direct-section').style.pointerEvents = 'auto'; document.getElementById('ig-selected-posts-input').value = ''; document.getElementById('ig-quantity-input').value = ''; document.getElementById('ig-per-post-input').value = ''; window.__igWidgetData = null; }); function loadPosts() { var username = document.getElementById('ig-username').value.trim().replace('@', ''); if (!username) { showError('الرجاء إدخال اسم المستخدم'); return; } hideError(); document.getElementById('ig-loading').style.display = 'block'; document.getElementById('ig-load-btn').disabled = true; fetch(API_BASE + '/api/public/instagram/posts?username=' + encodeURIComponent(username)) .then(function(response) { return response.json(); }) .then(function(data) { document.getElementById('ig-loading').style.display = 'none'; document.getElementById('ig-load-btn').disabled = false; if (data.isPrivate || data.errorCode === 'PRIVATE_PROFILE') { showError('الحساب خاص! يجب تحويل الحساب إلى عام لتتمكن من تحميل البوستات'); return; } if (data.success && data.posts && data.posts.length > 0) { allPosts = data.posts; visibleCount = INITIAL_POSTS; selectedPosts = []; document.getElementById('ig-input-section').style.display = 'none'; document.getElementById('ig-grid').style.display = 'grid'; document.getElementById('ig-selection-info').style.display = 'block'; document.getElementById('ig-note-text').textContent = 'اختر المنشورات التي تريد توزيع ال' + currentProduct.label + ' عليها'; document.getElementById('ig-cancel-btn').style.display = 'inline-block'; document.getElementById('ig-direct-section').style.opacity = '0.5'; document.getElementById('ig-direct-section').style.pointerEvents = 'none'; renderPosts(); } else { showError(data.error || 'لم يتم العثور على منشورات'); } }) .catch(function() { document.getElementById('ig-loading').style.display = 'none'; document.getElementById('ig-load-btn').disabled = false; showError('خطأ في تحميل المنشورات - حاول مرة أخرى'); }); } function renderPosts() { var grid = document.getElementById('ig-grid'); var maxPosts = updateMaxPosts(); var atLimit = selectedPosts.length >= maxPosts; grid.innerHTML = ''; var postsToShow = allPosts.slice(0, visibleCount); postsToShow.forEach(function(post) { var isSelected = selectedPosts.indexOf(post.url) > -1; var isDisabled = !isSelected && atLimit; var div = document.createElement('div'); div.className = 'ig-post' + (isSelected ? ' selected' : '') + (isDisabled ? ' disabled' : ''); div.dataset.url = post.url; div.innerHTML = '
    +0
    '; div.onclick = function() { togglePost(div, post.url); }; grid.appendChild(div); }); var loadMoreBtn = document.getElementById('ig-load-more'); loadMoreBtn.style.display = visibleCount >= allPosts.length ? 'none' : 'block'; if (visibleCount < allPosts.length) { loadMoreBtn.textContent = 'تحميل المزيد (' + (allPosts.length - visibleCount) + ' متبقي)'; } document.getElementById('ig-warning').style.display = atLimit ? 'block' : 'none'; updateInputs(); } function togglePost(el, url) { if (el.classList.contains('disabled')) return; var index = selectedPosts.indexOf(url); if (index > -1) { selectedPosts.splice(index, 1); } else { var maxPosts = updateMaxPosts(); if (selectedPosts.length >= maxPosts) return; selectedPosts.push(url); } renderPosts(); } function updateInputs() { var qty = getSelectedQuantity(); document.getElementById('ig-selected-count').textContent = selectedPosts.length; var selectSuccess = document.getElementById('ig-select-success'); if (selectedPosts.length > 0 && qty >= currentProduct.minPerPost) { var perPost = Math.floor(qty / selectedPosts.length); document.getElementById('ig-per-post').textContent = perPost; document.getElementById('ig-per-post-text').style.display = 'inline'; document.getElementById('ig-selected-posts-input').value = selectedPosts.join(','); document.getElementById('ig-quantity-input').value = qty.toString(); document.getElementById('ig-per-post-input').value = perPost.toString(); window.__igWidgetData = { selected_posts: selectedPosts.join(','), total_quantity: qty.toString(), per_post: perPost.toString() }; document.querySelectorAll('.ig-post.selected .ig-post-count').forEach(function(el) { el.textContent = perPost; }); selectSuccess.style.display = 'block'; } else { document.getElementById('ig-per-post-text').style.display = 'none'; selectSuccess.style.display = 'none'; if (directLink.length === 0) { document.getElementById('ig-selected-posts-input').value = ''; document.getElementById('ig-quantity-input').value = ''; document.getElementById('ig-per-post-input').value = ''; window.__igWidgetData = null; } } } function showError(msg) { var el = document.getElementById('ig-error'); el.textContent = msg; el.style.display = 'block'; } function hideError() { document.getElementById('ig-error').style.display = 'none'; } } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', createWidget); } else { createWidget(); } })();