עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

זקוק לסקריפט

Featured Replies

פורסם

הכנתי עמוד שיקפוץ ברגע שנכנס לעמוד מסויים.

אני רוצה שרק בפעם הראשונה שאני לוחץ העמוד שהכנתי יקפוץ לי, ולאחר מכן, אם אני עושה ריענון העמוד לא יקפוץ.

האם יש כזה סקריפט?

אודה לכם אם תוכלו לכתוב אותו כאן.

פורסם

הנה הקוד ב JAVASCRIPT, פשוט שים את הקוד שפותח את העמוד איפה שרשום alert('put popup code here');

<html>
<head>
<title>a test</title>
<script language="javascript" type="text/javascript">
function createCookie(name,value,days)
{
if (days)
{
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++)
{
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}

function eraseCookie(name)
{
createCookie(name,"",-1);
}

function checkStatus()
{
if (readCookie('popup') != '0')
{
alert('put popup code here');
createCookie('popup','0',50);
}
}

</script>
</head>
<body onLoad="checkStatus();">
this demo rocks !
</body>
</html>

פורסם
  • מחבר

את הקוד הנ"ל אני רושם בעמוד הקופץ או בעמוד המקור?

נ.ב

תודה על התגובה המהירה

פורסם

מן הסתם בעמוד המקור.. העמוד הקופץ לא צריך לדעת כלום, פשוט פעם אחת עמוד המקור יראה שאין קוקי, ואז יקפיץ, ואז הקוקי ישמר וזהו.

ד"א הערך 60 אומר שהקוקי ישמר ל 60 יום (אחרי זה הוא ימחק ואז העמוד יקפוץ שוב), תוכל לשנות את זה ל 1 או 2, ואז כל יום-יומיים הוא יקפוץ, או לתת ערך ממש גדול ואז רק פעם אחת (עד שמישהו ימחוק את הקוקי).

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.