-
Notifications
You must be signed in to change notification settings - Fork 0
Home
M ABD AZIZ ALFIAN edited this page Nov 10, 2019
·
9 revisions
Welcome to the safelink-jquery
wiki!
Here is the full example to using Safelink jQuery Plugin.
<html>
<head></head>
<body>
<!-- Put position for first button -->
<div id="safelinker1"></div>
<p>Here is could be paragraph of your site.</p>
<!-- Put position for second button -->
<div id="safelinker2"></div>
<script src="https://cdn.jsdelivr.net/npm/safelink-jquery@1.0.0/src/safelink.min.js"></script>
<script>
$(document).ready(function(){
// using timeout to make sure your ads already loaded completely
setTimeout(function() {
$('#safelinker1').Safelink().build('#safelinker2');
},5000);
});
</script>
</body>
</html>
Note:
- Your URL must be having parameter safelink to make this plugin works.
example:https://yourdomain.com?safelink=aHR0cHM6Ly9oZXhvZGVyLmNvbS9wb3N0L2NvbnRhY3Q=
- Using
base64
cryptography standard.
- $().Safelink(options) - Load Safelink plugin class.
-
Crypto
- Layer to use
base64` outside. -
encode(value) - Encode string to
base64
. -
decode(value) - Decode
base64
to string. - build(element, btnClass) - Button builder for safelink.
Load Safelink plugin class.
-
options
- is an object only to change the button text. [optional
]
Example:
$('#safelinker1').Safelink({
firstButtonText:'Click Here !!!',
secondButtonText: 'Get Link !!!'
}).build('#safelinker2');
Layer to use base64
outside.
Encode string to base64
.
Decode base64
to string.
Button builder for safelink.
-
element
- is the div position for the second button. -
btnClass
- is to add class for all safelink button. [optional
]
Example:
// All safelink buttons will use class from Bootstrap CSS
$('#safelinker1').Safelink().build('#safelinker2','btn btn-primary');