From accd027915f5cad87d8a840e83c03bbb03df3dcf Mon Sep 17 00:00:00 2001
From: Denny Dai <i@daihan.cn>
Date: Sat, 2 Apr 2016 09:37:15 +0800
Subject: [PATCH] Update plugin.php

---
 plugin.php | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/plugin.php b/plugin.php
index a79e8e2..577eeaf 100644
--- a/plugin.php
+++ b/plugin.php
@@ -11,25 +11,25 @@ Author URI: https://dennydai.github.io
 // EDIT THIS
 
 // Character to add to a short URL to trigger the preview interruption
-define( 'OZH_PREVIEW_CHAR', '~' );
+define( 'DD_PREVIEW_CHAR', '~' );
 
 // DO NO EDIT FURTHER
 
 // Handle failed loader request and check if there's a ~
-yourls_add_action( 'loader_failed', 'ozh_preview_loader_failed' );
-function ozh_preview_loader_failed( $args ) {
+yourls_add_action( 'loader_failed', 'dd_preview_loader_failed' );
+function dd_preview_loader_failed( $args ) {
         $request = $args[0];
         $pattern = yourls_make_regexp_pattern( yourls_get_shorturl_charset() );
-        if( preg_match( "@^([$pattern]+)".OZH_PREVIEW_CHAR."$@", $request, $matches ) ) {
+        if( preg_match( "@^([$pattern]+)".DD_PREVIEW_CHAR."$@", $request, $matches ) ) {
                 $keyword   = isset( $matches[1] ) ? $matches[1] : '';
                 $keyword = yourls_sanitize_keyword( $keyword );
-                ozh_preview_show( $keyword );
+                dd_preview_show( $keyword );
                 die();
         }
 }
 
 // Show the preview screen for a short URL
-function ozh_preview_show( $keyword ) {
+function dd_preview_show( $keyword ) {
         require_once( YOURLS_INC.'/functions-html.php' );
 
         yourls_html_head( 'preview', 'Short URL preview' );
@@ -38,7 +38,7 @@ function ozh_preview_show( $keyword ) {
         $title = yourls_get_keyword_title( $keyword );
         $url   = yourls_get_keyword_longurl( $keyword );
         $base  = YOURLS_SITE;
-        $char  = OZH_PREVIEW_CHAR;
+        $char  = DD_PREVIEW_CHAR;
         $qrcode = 'data:image/png;base64,'.base64_encode(file_get_contents('http://chart.apis.google.com/chart?chs=200x200&cht=qr&chld=M&chl='.YOURLS_SITE.'/'.$keyword));
 
         echo <<<HTML
@@ -56,4 +56,4 @@ function ozh_preview_show( $keyword ) {
 HTML;
 
         yourls_html_footer();
-}
\ No newline at end of file
+}